File: libgit2-agent-nonfatal.patch

package info (click to toggle)
julia 1.0.3%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 49,452 kB
  • sloc: lisp: 236,453; ansic: 55,579; cpp: 25,603; makefile: 1,685; pascal: 1,130; sh: 956; asm: 86; xml: 76
file content (25 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
commit 70020247d1903c7a1262d967cf205a44dc6f6ebe
Author: Keno Fischer <kfischer@college.harvard.edu>
Date:   Wed Jul 20 19:59:00 2016 -0400

    Make failure to connect to ssh-agent non-fatal

    Julia issue: https://github.com/JuliaLang/julia/pull/17459
    Upstream: https://github.com/libgit2/libgit2/issues/3866

diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index cfd5736..82d2c63 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -296,8 +296,10 @@ static int ssh_agent_auth(LIBSSH2_SESSION *session, git_cred_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);