summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.console
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2014-09-26 15:45:46 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2014-09-26 15:45:46 +0200
commit9fd1325ecbdfaa41965782166e77d0dc8dd936ec (patch)
treecc5111673ffa444c1c24ed6bf593855908038a88 /org.eclipse.jgit.console
parent85b62b4c9ce57e4caa7b10cd770b022bfef24ea9 (diff)
parent848186da86d624d09cd1518378edff4ad9b7f14f (diff)
downloadjgit-9fd1325ecbdfaa41965782166e77d0dc8dd936ec.tar.gz
jgit-9fd1325ecbdfaa41965782166e77d0dc8dd936ec.zip
Merge branch 'stable-3.5'
* stable-3.5: Prepare 3.5.1-SNAPSHOT builds JGit v3.5.0.201409260305-r Fix PackWriterBitmapWalker handling non-existing uninteresting objects Enable maven site generation for jgit Generate javadocs as part of Maven site project reports Compare API changes with clirr against 3.4.1 [cli] Use chaining credentials provider to enable .netrc Add chaining credentials provider [Java 8] Configure doclint to accept missing descriptions Do not use .netrc implicitly if no CredentialsProvider was set Prepare post 3.5.0-rc1 builds JGit 3.5.0.201409071800-rc1 Fix the ls-remote command when there is no local repo Change-Id: Iaa4485cac6ff9c7917380e89e12e416e0f52a557 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.console')
-rw-r--r--org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java b/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java
index 91034fd2cc..a01fd86b4d 100644
--- a/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java
+++ b/org.eclipse.jgit.console/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java
@@ -48,8 +48,10 @@ package org.eclipse.jgit.console;
import java.io.Console;
import org.eclipse.jgit.errors.UnsupportedCredentialItem;
+import org.eclipse.jgit.transport.ChainingCredentialsProvider;
import org.eclipse.jgit.transport.CredentialItem;
import org.eclipse.jgit.transport.CredentialsProvider;
+import org.eclipse.jgit.transport.NetRCCredentialsProvider;
import org.eclipse.jgit.transport.URIish;
/** Interacts with the user during authentication by using the text console. */
@@ -60,7 +62,9 @@ public class ConsoleCredentialsProvider extends CredentialsProvider {
if (c.cons == null)
throw new NoClassDefFoundError(
ConsoleText.get().noSystemConsoleAvailable);
- CredentialsProvider.setDefault(c);
+ CredentialsProvider cp = new ChainingCredentialsProvider(
+ new NetRCCredentialsProvider(), c);
+ CredentialsProvider.setDefault(cp);
}
private final Console cons = System.console();