Browse Source

FetchCommand: do not set a null credentials provider

FetchCommand now does not set a null credentials provider on
Transport because in this case the default provider is replaced with
null and the default mechanism for providing credentials is not
working.

Change-Id: I44096aa856f031545df39d4b09af198caa2c21f6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-0.12
Matthias Sohn 14 years ago
parent
commit
e0a8398f1f
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java

3
org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java

@ -128,7 +128,8 @@ public class FetchCommand extends GitCommand<FetchResult> {
if (tagOption != null)
transport.setTagOpt(tagOption);
transport.setFetchThin(thin);
transport.setCredentialsProvider(credentialsProvider);
if (credentialsProvider != null)
transport.setCredentialsProvider(credentialsProvider);
try {
FetchResult result = transport.fetch(monitor, refSpecs);

Loading…
Cancel
Save