diff options
author | Jens Baumgart <jens.baumgart@sap.com> | 2011-02-02 13:13:28 +0100 |
---|---|---|
committer | Jens Baumgart <jens.baumgart@sap.com> | 2011-02-02 13:13:28 +0100 |
commit | 29ed09a44fc1e32e9adb5a9e3acbbac044c0fb42 (patch) | |
tree | 77a388ad33c75ae4aca10abe820c2dee33d30f07 | |
parent | b0245b548b9c9fe1801fb8af727b08a7c3cc9706 (diff) | |
download | jgit-29ed09a44fc1e32e9adb5a9e3acbbac044c0fb42.tar.gz jgit-29ed09a44fc1e32e9adb5a9e3acbbac044c0fb42.zip |
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 <jens.baumgart@sap.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java | 3 |
1 files changed, 2 insertions, 1 deletions
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<Iterable<PushResult>> { if (receivePack != null) transport.setOptionReceivePack(receivePack); transport.setDryRun(dryRun); - transport.setCredentialsProvider(credentialsProvider); + if (credentialsProvider != null) + transport.setCredentialsProvider(credentialsProvider); final Collection<RemoteRefUpdate> toPush = transport .findRemoteRefUpdatesFor(refSpecs); |