IdentityAgent is set in ~/.ssh/config. This factory keeps that
default but falls back to the Windows OpenSSH agent's named pipe when Pageant is not running, so either agent
works without configuration. Explicitly configured agents are passed through untouched.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface | |
| pack-priv static class | SshAgentConnectorFactory.
Connects to the primary agent; if that is unavailable, switches to the fallback for the rest of the session. |
| Modifier and Type | Field and Description |
|---|---|
| private final ConnectorFactory | |
| private static final Logger | |
| pack-priv static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Connector | |
| public ConnectorFactory. | getDefaultConnector()
Implements org. Tells what kind of |
| public String | getName()
Implements org. Retrieves a name for this factory. |
| public Collection | getSupportedConnectors()
Implements org. Tells which kinds of SSH agents this |
| public static void | |
| public boolean | isSupported()
Implements org. Tells whether this |
| delegate | back to summary |
|---|---|
| private final ConnectorFactory delegate | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| OPENSSH_AGENT_PIPE | back to summary |
|---|---|
| pack-priv static final String OPENSSH_AGENT_PIPE | |
| SshAgentConnectorFactory | back to summary |
|---|---|
| pack-priv SshAgentConnectorFactory(ConnectorFactory delegate) | |
| create | back to summary |
|---|---|
| public Connector create(@Nullable String identityAgent, File homeDir) throws IOException Implements org. Doc from org. Creates a new
| |
| getDefaultConnector | back to summary |
|---|---|
| public ConnectorFactory. Implements org. Doc from org. Tells what kind of
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. Retrieves a name for this factory.
| |
| getSupportedConnectors | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Tells which kinds of SSH agents this An implementation of this method should document the possible values it returns.
| |
| install | back to summary |
|---|---|
| public static void install() Registers the fallback as jgit's default connector factory. No-op outside Windows, where jgit already honors
| |
| isSupported | back to summary |
|---|---|
| public boolean isSupported() Implements org. Doc from org. Tells whether this
| |
| get | back to summary |
|---|---|
| public Connector get() throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private Connector | |
| private final SshAgentConnectorFactory. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public boolean | connect()
Implements org. Connects to an SSH agent if there is one running. |
| public byte[] | rpc(byte command, byte[] message)
Implements org. Performs a remote call to the SSH agent and returns the result. |
| active | back to summary |
|---|---|
| private Connector active | |
| fallback | back to summary |
|---|---|
| private final SshAgentConnectorFactory. | |
| FallbackConnector | back to summary |
|---|---|
| pack-priv FallbackConnector(Connector primary, SshAgentConnectorFactory. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| connect | back to summary |
|---|---|
| public boolean connect() throws IOException Implements org. Doc from org. Connects to an SSH agent if there is one running. If called when already
connected just returns
| |
| rpc | back to summary |
|---|---|
| public byte[] rpc(byte command, byte[] message) throws IOException Implements org. Doc from org. Performs a remote call to the SSH agent and returns the result.
| |