Skip to content
Permalink
Browse files

Merge pull request #548 from stephenc/jenkins-47629

[FIXED JENKINS-47629] Forgot to apply the credentials in the short-cut
  • Loading branch information
MarkEWaite committed Oct 26, 2017
2 parents 6f48576 + 254ad49 commit 12a389b461320ae4665622ceccce4c3c76fecfee
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 12a389b

Please sign in to comment.