File: libgit2-agent-nonfatal.patch

package info (click to toggle)
julia 1.5.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 91,132 kB
  • sloc: lisp: 278,486; ansic: 60,186; cpp: 29,801; sh: 2,403; makefile: 1,998; pascal: 1,313; objc: 647; javascript: 516; asm: 226; python: 161; xml: 34
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);