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>
parent 5561070c
......@@ -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);
......
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