Skip to content
Permalink
Browse files

[FIXED JENKINS-47629] Forgot to apply the credentials in the short-cut

  • Loading branch information
stephenc committed Oct 26, 2017
1 parent 6f48576 commit 254ad49d933015d842bd839dae567d399a275b88
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java
@@ -748,6 +748,7 @@ public SCMRevision run(GitClient client, String remoteName) throws IOException,
git.using(tool.getGitExe());
}
GitClient client = git.getClient();
client.addDefaultCredentials(getCredentials());
Set<String> revisions = new HashSet<>();
if (context.wantBranches() || context.wantTags()) {
listener.getLogger().println("Listing remote references...");
@@ -801,6 +802,7 @@ public SCMRevision run(GitClient client, String remoteName) throws IOException,
git.using(tool.getGitExe());
}
GitClient client = git.getClient();
client.addDefaultCredentials(getCredentials());
Map<String, String> symrefs = client.getRemoteSymbolicReferences(getRemote(), null);
if (symrefs.containsKey(Constants.HEAD)) {
// Hurrah! The Server is Git 1.8.5 or newer and our client has symref reporting

0 comments on commit 254ad49

Please sign in to comment.