diff options
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java | 3 |
1 files changed, 3 insertions, 0 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 36d429a021..65e9d4dc55 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java @@ -117,6 +117,9 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory { } catch (JSchException e) { session.disconnect(); session = null; + // Make sure our known_hosts is not outdated + knownHosts(getJSch(hc, fs), fs); + // if authentication failed maybe credentials changed at the // remote end therefore reset credentials and retry if (credentialsProvider != null && e.getCause() == null |