Skip to content
Browse files
[JENKINS-43931] Allow username/password workspaces with space in path
Prior fix only handled ssh passphrase protected private keys

Note that the issue is only visible on Windows and only with workspaces
whose full path includes a space.
  • Loading branch information
MarkEWaite committed May 3, 2017
1 parent 03989f1 commit 4f27a7010ea9d2aa8516edd44791561f99792d41
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/org/jenkinsci/plugins/gitclient/
@@ -1665,7 +1665,7 @@ private File createUnixSshAskpass(SSHUserPrivateKey sshUser) throws IOException

/* Package protected for testability */
File createWindowsBatFile(String userName, String password) throws IOException {
File askpass = createTempFile("pass", ".bat");
File askpass = createTempFile("pass", ".bat", true);
try (PrintWriter w = new PrintWriter(askpass, Charset.defaultCharset().toString())) {
w.println("@set arg=%~1");
w.println("@if (%arg:~0,8%)==(Username) echo " + escapeWindowsCharsForUnquotedString(userName));

0 comments on commit 4f27a70

Please sign in to comment.