From e0a8398f1f167e4fceef7fa4ebbf413f16475e79 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 24 Feb 2011 13:52:24 +0100 Subject: [PATCH] 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 --- org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java index 28c2d15ff..9594dfebe 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java @@ -128,7 +128,8 @@ public FetchResult call() throws JGitInternalException, 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);