summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.apache.agent
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 6.3.0-SNAPSHOT buildsMatthias Sohn2022-06-073-9/+9
| | | | Change-Id: I092fdd2c35d85bf35e3ef700aa7078e6d304d977
* [releng] Fix MANIFEST.MF of o.e.j.ssh.apache.agentThomas Wolf2022-06-061-0/+1
| | | | | | | Add the missing Bundle-Localization header. Bug: 580081 Change-Id: If21e0778dbb60b49a8f83030461670656eeb0ce4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* WinPipeConnector: Resolve warnings by using "equals" instead of "=="Fabio Ponciroli2022-03-171-1/+1
| | | | | | | Errorprone raises the following warning: "[ReferenceEquality] Comparison using reference equality instead of value equality". Change-Id: Ic73305b2af628f66e7659ea1b839b3a640e3cd8d
* Prepare 6.2.0-SNAPSHOT buildsMatthias Sohn2022-03-033-9/+9
| | | | Change-Id: Ic2dde88bee3242169d6fa50956f8938f3fc4ba8e
* sshd: Add README.md for SSH agentsThomas Wolf2022-01-301-0/+82
| | | | | | | | Explain SSH agent protocols, what transports are available and how to choose them in ~/.ssh/config. For Windows, add some information on which commonly used SSH agents can be used. Change-Id: I0b08a95654fd76643512606edb1ed74d9980aa85 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* sshd: handle "IdentityAgent SSH_AUTH_SOCK" in ssh configThomas Wolf2022-01-302-9/+5
| | | | | | | | | OpenSSH has (for legacy reasons?) the option of specifying the default environment variable directly, instead of using ${SSH_AUTH_SOCK}. Make sure the plain variable name is not taken as a relative path name. Bug: 577053 Change-Id: If8f550dffc43887254f71aa0b487c50fa14d0627 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* sshd: Connector for the Win32-OpenSSH SSH agentThomas Wolf2022-01-305-2/+249
| | | | | | | | | 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>
* sshd: support IdentityAgent configThomas Wolf2022-01-301-1/+4
| | | | | | | | | Handle the 'none' value, and change the value to select Pageant to something that looks like an absolute UNC path name to avoid it's handled as an relative path name. Bug: 577053 Change-Id: I4ccf047abbc1def50e2782319e4fa7c744069401 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Bazel: Format build files with buildifierDavid Ostrovsky2022-01-201-1/+1
| | | | Change-Id: I1ff38237058d11a3f61acc881c504382ff4b7e08
* [releng] bump japicmp base version and configure sshd bundlesThomas Wolf2022-01-051-4/+6
| | | | | | | | Bump the japicmp base version to 6.0.0.202111291000-r and configure the o.e.j.ssh.apache and o.e.j.ssh.apache.agent bundles to ignore internal classes. Change-Id: Id95350c73b9141e1583f9de5fb6ab2496c7407d9 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Prepare 6.1.0-SNAPSHOT buildsMatthias Sohn2021-11-243-9/+9
| | | | Change-Id: Ied07b1298bd32672a5025cec5079440ab9b9a100
* Add missing .gitignore in o.e.j.ssh.apache.agentThomas Wolf2021-11-151-0/+2
| | | | | | Ignore /bin and /target. Change-Id: I38f3748273b5243c54e010bfceac745084755f45 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* [sshd agent] Introduce ConnectorDescriptorThomas Wolf2021-11-105-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | | Once a factory supports different SSH agents on the same platform, which is planned for Windows once we use Apache MINA sshd 2.8.0, client code may need to have a way to specify which SSH agent shall be used when the SSH config doesn't define anything. Add a mechanism by which a ConnectorFactory can tell what Connectors it may provide. Client code can use this to set the identityAgent parameter of ConnectorFactory.create() to the wanted default if it would be null otherwise. A ConnectorDescriptor is a pair of strings: an internal name, and a display name. The latter is included because client code might want to communicate agent names to the user, be it in error messages or in some chooser dialog where a user could define which of several alternative SSH agents should be used as default. The internal name is intended to be used in the IdentityAgent directive in ~/.ssh/config. Also make the ConnectorFactory discovered via the ServiceLoader accessible and overrideable. Provide static get/setDefault() methods, similar to the SshSessionFactory itself. Change-Id: Ie3d077395d32dfddc72bc8627e92b23636938182 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* sshd: add support for ssh-agentThomas Wolf2021-11-0328-0/+2135
Add a simple SSH agent connector using JNA. Include com.sum.jna and com.sun.jna.platform in the target platform. JNA is used to communicate through Unix domain sockets with ssh-agent, and if on Windows, to communicate via shared memory with Pageant. The new bundle o.e.j.ssh.apache.agent is an OSGi fragment so that the java.util.ServiceLoader can find the provided factory without further ado in OSGi environments. Adapt both maven and bazel builds to include the new bundle. Manually tested on OS X, CentOS 7, and Win10 with Pageant 0.76. Tested by installing JGit built from this change into freshly downloaded Eclipse 2021-12 M1, and then doing git fetches via SSH with different ~/.ssh/config settings (explicit IdentityFile, without any but a key in the agent, with no keys and a key in the agent and IdentitiesOnly=yes (must fail)). Bug: 541274 Bug: 541275 Change-Id: I34e85467293707dbad1eb44d1f40fc2e70ba3622 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>