Skip to content

Commit dbb6429

Browse files
authored
Merge pull request libgit2#5305 from kas-luthor/bugfix/multiple-auth
Adds support for multiple SSH auth mechanisms being used sequentially
2 parents 9181e4b + cb7fd1e commit dbb6429

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/transports/ssh.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,14 @@ static int _git_ssh_setup_conn(
646646
}
647647

648648
error = _git_ssh_authenticate_session(session, cred);
649+
650+
if (error == GIT_EAUTH) {
651+
/* refresh auth methods */
652+
if ((error = list_auth_methods(&auth_methods, session, urldata.username)) < 0)
653+
goto done;
654+
else
655+
error = GIT_EAUTH;
656+
}
649657
}
650658

651659
if (error < 0)

0 commit comments

Comments
 (0)