Skip to content

Commit

Permalink
JENKINS-20879 - make sure $SSH_ASKPASS is not ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgl-orange committed May 13, 2015
1 parent 2f0cd5d commit 21bc735
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -1530,6 +1530,8 @@ private File createUnixGitSSH(File key) throws IOException {
File ssh = File.createTempFile("ssh", ".sh");
PrintWriter w = new PrintWriter(ssh);
w.println("#!/bin/sh");
// ${SSH_ASKPASS} might be ignored if ${DISPLAY} is not set
w.println("[ -z \"${DISPLAY}\" ] && export DISPLAY=:123.456");
w.println("ssh -i \"" + key.getAbsolutePath() + "\" -o StrictHostKeyChecking=no \"$@\"");
w.close();
ssh.setExecutable(true);
Expand Down

0 comments on commit 21bc735

Please sign in to comment.