Merge pull request #5305 from kas-luthor/bugfix/multiple-auth Adds support for multiple SSH auth mechanisms being used sequentially
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index ecf55db..18d90a9 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)