diff options
author | lsowen <logan@s1network.com> | 2015-06-08 21:47:27 -0400 |
---|---|---|
committer | lsowen <logan@s1network.com> | 2015-06-08 21:50:01 -0400 |
commit | 8a22e6efe340ac673a6166b26b3e9fc2d87fc952 (patch) | |
tree | ea3d376e11c721134ac7742e8bd333b11c4f4578 | |
parent | 84589ab8692c167aa18fdb4881b53a111e761d63 (diff) |
Fix issue with servers that have GSSAPI authentication enabled.
Force SSH client to only try publickey and password authentication modes (in that order).
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/config/SshConfigSessionFactory.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/config/SshConfigSessionFactory.java b/app/src/main/java/com/zeapo/pwdstore/git/config/SshConfigSessionFactory.java index 333a6325..e156ca4d 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/config/SshConfigSessionFactory.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/config/SshConfigSessionFactory.java @@ -38,6 +38,7 @@ public class SshConfigSessionFactory extends GitConfigSessionFactory { @Override protected void configure(OpenSshConfig.Host hc, Session session) { session.setConfig("StrictHostKeyChecking", "no"); + session.setConfig("PreferredAuthentications", "publickey,password"); CredentialsProvider provider = new CredentialsProvider() { @Override @@ -67,4 +68,4 @@ public class SshConfigSessionFactory extends GitConfigSessionFactory { UserInfo userInfo = new CredentialsProviderUserInfo(session, provider); session.setUserInfo(userInfo); } -}
\ No newline at end of file +} |