The SSH transport requires the remote side to have Git installed, as the transport logs into the remote system and executes a Git helper program on the remote side to read (or write) the remote repository's files.
This transport does not support direct SCP style of copying files, as it assumes there are Git specific smarts on the remote side to perform object enumeration, save file modification and hook execution.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| pack-priv class | |
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| pack-priv static final TransportProtocol |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv NoRemoteRepositoryException | |
| pack-priv String | |
| private void | |
| public FetchConnection | openFetch()
Implements abstract org. Begins a new connection for fetching from the remote repository. |
| public FetchConnection | openFetch(Collection<RefSpec>
that will be fetched via
refSpecs, String... FetchConnection#fetch(ProgressMonitor, Collection, java. laterthat will be set as ref prefixes if the server supports git
protocol V2; additionalPatterns)null values are ignoredOverrides org. Begins a new connection for fetching from the remote repository. |
| public PushConnection | openPush()
Implements abstract org. Begins a new connection for pushing into the remote repository. |
| private static boolean |
| EXT | back to summary |
|---|---|
| private static final String EXT | |
| PROTO_SSH | back to summary |
|---|---|
| pack-priv static final TransportProtocol PROTO_SSH | |
| TransportGitSsh | back to summary |
|---|---|
| pack-priv TransportGitSsh(Repository local, URIish uri) | |
| TransportGitSsh | back to summary |
|---|---|
| pack-priv TransportGitSsh(URIish uri) | |
| checkExecFailure | back to summary |
|---|---|
| pack-priv void checkExecFailure(int status, String exe, String why) throws TransportException | |
| cleanNotFound | back to summary |
|---|---|
| pack-priv NoRemoteRepositoryException cleanNotFound(NoRemoteRepositoryException nf, String why) | |
| commandFor | back to summary |
|---|---|
| pack-priv String commandFor(String exe) | |
| initSshSessionFactory | back to summary |
|---|---|
| private void initSshSessionFactory() | |
| openFetch | back to summary |
|---|---|
| public FetchConnection openFetch() throws TransportException Implements abstract org. Doc from org. Begins a new connection for fetching from the remote repository. If the transport has no local repository, the fetch connection can only be used for reading remote refs.
| |
| openFetch | back to summary |
|---|---|
| public FetchConnection openFetch(Collection<RefSpec> refSpecs, String... additionalPatterns) throws NotSupportedException, TransportException Overrides org. Doc from org. Begins a new connection for fetching from the remote repository. If the transport has no local repository, the fetch connection can only be used for reading remote refs.
If the server supports git protocol V2, the
Transports that want to support git protocol V2 must override
this; the default implementation ignores its arguments and calls
| |
| openPush | back to summary |
|---|---|
| public PushConnection openPush() throws TransportException Implements abstract org. Doc from org. Begins a new connection for pushing into the remote repository.
| |
| useExtSession | back to summary |
|---|---|
| private static boolean useExtSession() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private ProcessBuilder | |
| public void | disconnect()
Implements org. Disconnects the remote session. |
| public Process | exec(String
command to execute command, int timeout value, in seconds, for creating the remote process timeout)Implements org. Creates a new remote |
| public Process |
| ExtSession | back to summary |
|---|---|
| private ExtSession() | |
| createProcess | back to summary |
|---|---|
| private ProcessBuilder createProcess(List<String> args, Map<String, String> environment) | |
| disconnect | back to summary |
|---|---|
| public void disconnect() Implements org. Doc from org. Disconnects the remote session.
| |
| exec | back to summary |
|---|---|
| public Process exec(String command, int timeout) throws TransportException Implements org. Doc from org. Creates a new remote | |
| exec | back to summary |
|---|---|
| public Process exec(String command, Map<String, String> environment, int timeout) throws TransportException Implements org. Doc from org. Creates a new remote | |
| Modifier and Type | Field and Description |
|---|---|
| private StreamCopyThread | |
| private final Process |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides org. Implements org. Closes this resource, relinquishing any underlying resources. |
| errorThread | back to summary |
|---|---|
| private StreamCopyThread errorThread | |
| process | back to summary |
|---|---|
| private final Process process | |
| SshFetchConnection | back to summary |
|---|---|
| pack-priv SshFetchConnection() throws TransportException | |
| SshFetchConnection | back to summary |
|---|---|
| pack-priv SshFetchConnection(Collection<RefSpec> refSpecs, String... additionalPatterns) throws TransportException | |
| close | back to summary |
|---|---|
| public void close() Overrides org. Implements org. Doc from org. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
Close any resources used by this connection. If the remote repository is contacted by a network socket this method must close that network socket, disconnecting the two peers. If the remote repository is actually local (same system) this method must close any open file handles used to read the "remote" repository.
If additional messages were produced by the remote peer, these should
still be retained in the connection instance for
| |
| Modifier and Type | Field and Description |
|---|---|
| private StreamCopyThread | |
| private final Process |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides org. Implements org. Closes this resource, relinquishing any underlying resources. |
| errorThread | back to summary |
|---|---|
| private StreamCopyThread errorThread | |
| process | back to summary |
|---|---|
| private final Process process | |
| SshPushConnection | back to summary |
|---|---|
| pack-priv SshPushConnection() throws TransportException | |
| close | back to summary |
|---|---|
| public void close() Overrides org. Implements org. Doc from org. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
Close any resources used by this connection. If the remote repository is contacted by a network socket this method must close that network socket, disconnecting the two peers. If the remote repository is actually local (same system) this method must close any open file handles used to read the "remote" repository.
If additional messages were produced by the remote peer, these should
still be retained in the connection instance for
| |