summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDariusz Luksza2012-05-16 01:55:03 (EDT)
committer Dariusz Luksza2012-05-16 01:55:03 (EDT)
commit28d48b87ad41153ba3d53e75258e2bbbaaa0ab44 (patch)
tree099bcb13dd68da0c0191e633b5c6b7681bff87de
parent37307af6b4e5a9b28518d94f8db6c279361995b3 (diff)
downloadjgit-28d48b87ad41153ba3d53e75258e2bbbaaa0ab44.zip
jgit-28d48b87ad41153ba3d53e75258e2bbbaaa0ab44.tar.gz
jgit-28d48b87ad41153ba3d53e75258e2bbbaaa0ab44.tar.bz2
Don't swallow JSchException "Auth fail" exceptionrefs/changes/88/5988/3
"Auth fail" exception was swallowed during retrying, this leads to "Session down" exception during clone operation with invalid SSH keys. Bug: 336795 Change-Id: Id8d9e83b10f4f2a01e0cf89819190bb23a04a2b9 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
index e663cb0..917ad53 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
@@ -120,7 +120,8 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
// if authentication failed maybe credentials changed at the
// remote end therefore reset credentials and retry
if (credentialsProvider != null && e.getCause() == null
- && e.getMessage().equals("Auth fail")) {
+ && e.getMessage().equals("Auth fail")
+ && retries < 3) {
credentialsProvider.reset(uri);
session = createSession(credentialsProvider, fs, user,
pass, host, port, hc);