summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Pearce <sop@google.com>2014-04-25 12:34:37 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2014-04-25 12:34:37 -0400
commit06af8f5cc2ebd8eb1a5d231c995be030b7bf861d (patch)
tree38831a94e0cd1047d393d22c0c212e025481de3b
parent62697c8d338f8430fcd7e925a02b31bcf88a43b2 (diff)
parent44025d4c54dd8c31b8aaf9140035086d28ad309d (diff)
downloadjgit-06af8f5cc2ebd8eb1a5d231c995be030b7bf861d.tar.gz
jgit-06af8f5cc2ebd8eb1a5d231c995be030b7bf861d.zip
Merge "Automatically reload known_hosts file"
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java3
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