浏览代码

Don't swallow JSchException "Auth fail" exception

"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>
tags/v2.0.0.201206130900-r
Dariusz Luksza 12 年前
父节点
当前提交
28d48b87ad
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java

+ 2
- 1
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);

正在加载...
取消
保存