]> source.dussan.org Git - jgit.git/commit
Allow retrying connecting SshSession in case of an exception 76/28676/4
authorStefan Lay <stefan.lay@sap.com>
Wed, 18 Jun 2014 09:33:34 +0000 (11:33 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 20 Jun 2014 09:48:53 +0000 (11:48 +0200)
commit4b2b3294b8af9631ea66728baa2839fbcca630f5
tree664e84c2daf71bd5f4a040e5351c20c6e44aa400
parent126eb94f77cd1ace3ece582d001fded286115f7b
Allow retrying connecting SshSession in case of an exception

Connecting to an SshSession may fail due to different reasons. Jsch for
example often throws an com.jcraft.jsch.JschException: verify: false.[1]
The issue is still not fixed in JSch 0.1.51.

In such a case it is worth retrying to connect. The number of connection
attempts can be configured using ssh_config parameter
"ConnectionAttempts" [2].

Don't retry if the user canceled authentication.

[1] http://sourceforge.net/p/jsch/bugs/58/
[2] http://linux.die.net/man/5/ssh_config

Bug: 437656
Change-Id: I6dd2a3786b7d3f15f5a46821d8edac987a57e381
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java