From 8a22e6efe340ac673a6166b26b3e9fc2d87fc952 Mon Sep 17 00:00:00 2001 From: lsowen Date: Mon, 8 Jun 2015 21:47:27 -0400 Subject: Fix issue with servers that have GSSAPI authentication enabled. Force SSH client to only try publickey and password authentication modes (in that order). --- .../java/com/zeapo/pwdstore/git/config/SshConfigSessionFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src/main/java') 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 +} -- cgit v1.2.3