Skip to content

Commit c9387a6

Browse files
authored
Merge pull request libgit2#6497 from fxcoudert/ssh-agent-nonfatal
Make failure to connect to ssh-agent non-fatal
2 parents 11579d5 + d286952 commit c9387a6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • src/libgit2/transports

src/libgit2/transports/ssh.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,10 @@ static int ssh_agent_auth(LIBSSH2_SESSION *session, git_credential_ssh_key *c) {
246246

247247
rc = libssh2_agent_connect(agent);
248248

249-
if (rc != LIBSSH2_ERROR_NONE)
249+
if (rc != LIBSSH2_ERROR_NONE) {
250+
rc = LIBSSH2_ERROR_AUTHENTICATION_FAILED;
250251
goto shutdown;
252+
}
251253

252254
rc = libssh2_agent_list_identities(agent);
253255

0 commit comments

Comments
 (0)