summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-01-10 14:30:18 +0100
committerGitHub <noreply@github.com>2020-01-10 14:30:18 +0100
commitdbb6429c60fb3c266197ab22633fda88b0e7ea29 (patch)
treef188fe5b8f7470707133fb5bae82a0824078f1b7
parent9181e4b586e2b27846554c12c06002438b159086 (diff)
parentcb7fd1ede8651398b94a4db9407678423948101a (diff)
downloadlibgit2-dbb6429c60fb3c266197ab22633fda88b0e7ea29.tar.gz
Merge pull request #5305 from kas-luthor/bugfix/multiple-auth
Adds support for multiple SSH auth mechanisms being used sequentially
-rw-r--r--src/transports/ssh.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index ecf55dbd4..18d90a964 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -646,6 +646,14 @@ post_extract:
}
error = _git_ssh_authenticate_session(session, cred);
+
+ if (error == GIT_EAUTH) {
+ /* refresh auth methods */
+ if ((error = list_auth_methods(&auth_methods, session, urldata.username)) < 0)
+ goto done;
+ else
+ error = GIT_EAUTH;
+ }
}
if (error < 0)