Skip to content
Permalink
Browse files

JENKINS-20879 - make sure $SSH_ASKPASS is not ignored

  • Loading branch information
thomasgl-orange committed May 13, 2015
1 parent 2f0cd5d commit 21bc7357e20649bf3c96ed1cd12471ea330abe5d
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 21bc735

Please sign in to comment.