Skip to content

Commit

Permalink
Merge pull request #548 from stephenc/jenkins-47629
Browse files Browse the repository at this point in the history
[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 12a389b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/jenkins/plugins/git/AbstractGitSCMSource.java
Expand Up @@ -748,6 +748,7 @@ protected Set<String> retrieveRevisions(@NonNull final TaskListener listener) th
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...");
Expand Down Expand Up @@ -801,6 +802,7 @@ protected List<Action> retrieveActions(@CheckForNull SCMSourceEvent event, @NonN
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
Expand Down

0 comments on commit 12a389b

Please sign in to comment.