aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.apache
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2021-12-27 21:39:23 +0100
committerThomas Wolf <thomas.wolf@paranor.ch>2022-01-30 17:13:46 +0100
commite0281c5adb89f0b109abca57970c7b89df63ede4 (patch)
treeb6f90f08c5a4892f1a6ddd171d709e04dabc5c5c /org.eclipse.jgit.ssh.apache
parent071084818cae26fd3f1075d4e6763218197c94d5 (diff)
downloadjgit-e0281c5adb89f0b109abca57970c7b89df63ede4.tar.gz
jgit-e0281c5adb89f0b109abca57970c7b89df63ede4.zip
sshd: Connector for the Win32-OpenSSH SSH agent
Win32-OpenSSH uses a named Windows pipe for communication. Implement a connector for this mechanism using JNA. Choose the appropriate connector based on the setting of the 'identityAgent' parameter. Bug: 577053 Change-Id: I205f07fb33654aa18ca5db92706e65544ce38641 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.ssh.apache')
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java
index 692fb9360d..13ca351eab 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/agent/SshAgentClient.java
@@ -73,11 +73,18 @@ public class SshAgentClient implements SshAgent {
}
return false;
}
- boolean connected = connector != null && connector.connect();
- if (!connected) {
+ boolean connected;
+ try {
+ connected = connector != null && connector.connect();
+ if (!connected && debugging) {
+ LOG.debug("No SSH agent"); //$NON-NLS-1$
+ }
+ } catch (IOException e) {
+ // Agent not running?
if (debugging) {
- LOG.debug("No SSH agent (SSH_AUTH_SOCK not set)"); //$NON-NLS-1$
+ LOG.debug("No SSH agent", e); //$NON-NLS-1$
}
+ throw e;
}
return connected;
}