From: Jens Baumgart Date: Wed, 2 Feb 2011 12:13:28 +0000 (+0100) Subject: PushCommand: do not set a null credentials provider X-Git-Tag: v0.11.1~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F2400%2F1;p=jgit.git 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 --- 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);