Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #132 from timothy-volvo/master
JENKINS-22999 - Git Polling and Git Configuration check fail
  • Loading branch information
ndeloof committed May 14, 2014
2 parents a04dcd9 + 2fefeae commit cf86856
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
Expand Up @@ -1164,6 +1164,22 @@ private String launchCommandWithCredentials(ArgumentListBuilder args, File workD
String fileStore = launcher.isUnix() ? store.getAbsolutePath() : "\\\"" + store.getAbsolutePath() + "\\\"";
launchCommandIn(workDir, "config", "--local", "credential.helper", "store --file=" + fileStore);
}

if (proxy != null) {
boolean shouldProxy = true;
for(Pattern p : proxy.getNoProxyHostPatterns()) {
if(p.matcher(url.getHost()).matches()) {
shouldProxy = false;
break;
}
}
if(shouldProxy) {
String http_proxy = "http://" + proxy.name + ":" + proxy.port + "/";
listener.getLogger().println("Setting http proxy: " + http_proxy);
environment.put("http_proxy", http_proxy);
environment.put("https_proxy", http_proxy);
}
}
}

return launchCommandIn(args, workDir, env, timeout);
Expand Down

0 comments on commit cf86856

Please sign in to comment.