mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
Make failure to connect to ssh-agent non-fatal
Fixes https://github.com/libgit2/libgit2/issues/3866 Has been applied in all Julia builds since 2017: https://github.com/JuliaLang/julia/pull/17459 Authored-by: Keno Fischer <kfischer@college.harvard.edu>
This commit is contained in:
@@ -246,8 +246,10 @@ static int ssh_agent_auth(LIBSSH2_SESSION *session, git_credential_ssh_key *c) {
|
||||
|
||||
rc = libssh2_agent_connect(agent);
|
||||
|
||||
if (rc != LIBSSH2_ERROR_NONE)
|
||||
if (rc != LIBSSH2_ERROR_NONE) {
|
||||
rc = LIBSSH2_ERROR_AUTHENTICATION_FAILED;
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
rc = libssh2_agent_list_identities(agent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user