2

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!

Sheng
  • 1,697
  • 4
  • 19
  • 33
  • 1
    Which version of Ivy are you using? There is a Jira Bug for Version 2.0 : https://issues.apache.org/jira/browse/IVY-783 which should be fixed now. – oers Sep 19 '12 at 09:17

1 Answers1

0

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.

Jerry
  • 669
  • 8
  • 17