ivy ssh publisher

牧云@^-^@ 提交于 2019-12-08 01:16:22

问题


I am trying to use ssh publisher to publish artifacts to a remote server through 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>

However when I tried to publish, I got the following error

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)
....

So I set the DISPLAY variable in the bash_profile of the remote user, I tried both

export DISPLAY=:0.0
export DISPLAY=<jenkin.server.ip>:0.0

But none of them works. Could someone shed lights on me how to work this out? Thanks!


回答1:


I think Ivy is trying to prompt you to enter a password but since Jenkins is running headless, it cannot do so. Check your keyfile.



来源:https://stackoverflow.com/questions/12486604/ivy-ssh-publisher

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!