From 29ed09a44fc1e32e9adb5a9e3acbbac044c0fb42 Mon Sep 17 00:00:00 2001 From: Jens Baumgart Date: Wed, 2 Feb 2011 13:13:28 +0100 Subject: [PATCH] PushCommand: do not set a null credentials provider PushCommand 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. Bug: 336023 Change-Id: I7a7a9221afcfebe2e1595a5e59641e6c1ae4a207 Signed-off-by: Jens Baumgart --- org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java index 3a35827b9a..e8175d0997 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java @@ -139,7 +139,8 @@ public class PushCommand extends GitCommand> { if (receivePack != null) transport.setOptionReceivePack(receivePack); transport.setDryRun(dryRun); - transport.setCredentialsProvider(credentialsProvider); + if (credentialsProvider != null) + transport.setCredentialsProvider(credentialsProvider); final Collection toPush = transport .findRemoteRefUpdatesFor(refSpecs); -- 2.39.5