Commit fbdf5bdd by kas

Adds support for multiple SSH auth mechanisms being used sequentially

parent 01ea911b
...@@ -518,6 +518,7 @@ static int _git_ssh_setup_conn( ...@@ -518,6 +518,7 @@ static int _git_ssh_setup_conn(
{ {
git_net_url urldata = GIT_NET_URL_INIT; git_net_url urldata = GIT_NET_URL_INIT;
int auth_methods, error = 0; int auth_methods, error = 0;
int sub_error;
size_t i; size_t i;
ssh_stream *s; ssh_stream *s;
git_cred *cred = NULL; git_cred *cred = NULL;
...@@ -638,6 +639,15 @@ post_extract: ...@@ -638,6 +639,15 @@ post_extract:
} }
error = _git_ssh_authenticate_session(session, cred); error = _git_ssh_authenticate_session(session, cred);
if (error == GIT_EAUTH) {
/* refresh auth methods */
sub_error = list_auth_methods(&auth_methods, session, urldata.username);
if (sub_error < 0) {
error = sub_error;
goto done;
}
}
} }
if (error < 0) if (error < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment