mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-02 23:35:08 +00:00
Fix issue with servers that have GSSAPI authentication enabled.
Force SSH client to only try publickey and password authentication modes (in that order).
This commit is contained in:
@@ -38,6 +38,7 @@ public class SshConfigSessionFactory extends GitConfigSessionFactory {
|
|||||||
@Override
|
@Override
|
||||||
protected void configure(OpenSshConfig.Host hc, Session session) {
|
protected void configure(OpenSshConfig.Host hc, Session session) {
|
||||||
session.setConfig("StrictHostKeyChecking", "no");
|
session.setConfig("StrictHostKeyChecking", "no");
|
||||||
|
session.setConfig("PreferredAuthentications", "publickey,password");
|
||||||
|
|
||||||
CredentialsProvider provider = new CredentialsProvider() {
|
CredentialsProvider provider = new CredentialsProvider() {
|
||||||
@Override
|
@Override
|
||||||
@@ -67,4 +68,4 @@ public class SshConfigSessionFactory extends GitConfigSessionFactory {
|
|||||||
UserInfo userInfo = new CredentialsProviderUserInfo(session, provider);
|
UserInfo userInfo = new CredentialsProviderUserInfo(session, provider);
|
||||||
session.setUserInfo(userInfo);
|
session.setUserInfo(userInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user