Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #499 from MarkEWaite/master-PRxxx-npe-passing-null…
…-context-to-credentials

JENKINS-44640 - Fix NPE checking legacy git SCM URL
  • Loading branch information
MarkEWaite committed Jun 2, 2017
2 parents a274696 + f90a852 commit 2903c1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/hudson/plugins/git/UserRemoteConfig.java
Expand Up @@ -187,7 +187,11 @@ public FormValidation doCheckUrl(@AncestorInPath Item item,
.getClient();
StandardCredentials credential = lookupCredentials(item, credentialsId, url);
git.addDefaultCredentials(credential);
CredentialsProvider.track(item, credential);

// Should not track credentials use in any checkURL method, rather should track
// credentials use at the point where the credential is used to perform an
// action (like poll the repository, clone the repository, publish a change
// to the repository).

// attempt to connect the provided URL
try {
Expand Down

0 comments on commit 2903c1a

Please sign in to comment.