Skip to content
Permalink
Browse files

Merge pull request #168 from thomasgl-orange/JENKINS-20879

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 0e67e3d4003124d98db540b86f27d0c4d1347493
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
@@ -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);

0 comments on commit 0e67e3d

Please sign in to comment.