Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-21016] do not actually need to replace path with forward sla…
…shes, so revert. More importantly need the credentials on a single line so that the git command can read successfully
  • Loading branch information
pphillips-techphob authored and ndeloof committed Dec 20, 2013
1 parent fa5b79e commit a301ee3
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -978,9 +978,7 @@ private String launchCommandWithCredentials(ArgumentListBuilder args, File workD

String urlWithCredentials = getGitCrendentialsURL(url, credentials);
store = createGitCredentialsStore(urlWithCredentials);
// git cli needs forward slashes for the store path
String path = store.getAbsolutePath().replace('\\','/');
launchCommandIn(workDir, "config", "--local", "credential.helper", "store --file=\\\"" + path + "\\\"");
launchCommandIn(workDir, "config", "--local", "credential.helper", "store --file=\\\"" + store.getAbsolutePath() + "\\\"");
}
}

Expand All @@ -1005,7 +1003,7 @@ private String launchCommandWithCredentials(ArgumentListBuilder args, File workD
private File createGitCredentialsStore(String urlWithCredentials) throws IOException {
File store = File.createTempFile("git", ".credentials");
PrintWriter w = new PrintWriter(store);
w.println(urlWithCredentials);
w.print(urlWithCredentials);
w.flush();
w.close();
return store;
Expand Down

0 comments on commit a301ee3

Please sign in to comment.