Browse Source

Merge "Automatically reload known_hosts file"

stable-3.4
Shawn Pearce 11 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
06af8f5cc2
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java

3
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

Loading…
Cancel
Save