Skip to content

Commit

Permalink
Merge pull request #168 from thomasgl-orange/JENKINS-20879
Browse files Browse the repository at this point in the history
JENKINS-20879 - make sure $SSH_ASKPASS is not ignored on Unix.

Does not fix the passphrase protected private keys on Windows, 
just on Unix machines.
  • Loading branch information
MarkEWaite committed May 16, 2015
2 parents 2f0cd5d + 21bc735 commit 0e67e3d
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 0e67e3d

Please sign in to comment.