我正在尝试使用 ssh 发布者通过 jenkins 将工件发布到远程服务器。
<ssh name="ssh-publisher" host="myhost.com" user="dummy" keyFile="/home/dummy/id_rsa">
<ivy pattern="/data/refdata/local0/artifacts[organisation]/[module]/[revision]/ivy-[revision].xml"/>
<artifact pattern="/data/refdata/local0/artifacts/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
</ssh>
但是,当我尝试发布时,出现以下错误
impossible to publish artifacts for <my.artifacts>;<my.version>: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:407)
at java.awt.Frame.<init>(Frame.java:402)
at java.awt.Frame.<init>(Frame.java:367)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1731)
....
所以我在远程用户的 bash_profile 中设置了 DISPLAY 变量,我都试过了
export DISPLAY=:0.0
export DISPLAY=<jenkin.server.ip>:0.0
但它们都不起作用。有人可以告诉我如何解决这个问题吗?谢谢!