public class TransportGitSsh extends SshTransport implements PackTransport
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 |
TransportGitSsh.ExtSession |
(package private) class |
TransportGitSsh.SshFetchConnection |
(package private) class |
TransportGitSsh.SshPushConnection |
Transport.Operation
Modifier and Type | Field and Description |
---|---|
(package private) static TransportProtocol |
PROTO_SSH |
DEFAULT_FETCH_THIN, DEFAULT_PUSH_THIN, local, REFSPEC_PUSH_ALL, REFSPEC_TAGS, uri
Constructor and Description |
---|
TransportGitSsh(Repository local,
URIish uri) |
TransportGitSsh(URIish uri) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
checkExecFailure(int status,
java.lang.String exe,
java.lang.String why) |
(package private) NoRemoteRepositoryException |
cleanNotFound(NoRemoteRepositoryException nf,
java.lang.String why) |
(package private) java.lang.String |
commandFor(java.lang.String exe) |
private void |
initSshSessionFactory() |
FetchConnection |
openFetch()
Begins a new connection for fetching from the remote repository.
|
PushConnection |
openPush()
Begins a new connection for pushing into the remote repository.
|
private static boolean |
useExtSession() |
close, getSession, getSshSessionFactory, setSshSessionFactory
applyConfig, fetch, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, findRemoteRefUpdatesFor, getCredentialsProvider, getFilterBlobLimit, getFilterSpec, getObjectChecker, getOptionReceivePack, getOptionUploadPack, getPackConfig, getPushOptions, getTagOpt, getTimeout, getTransportProtocols, getURI, isCheckFetchedObjects, isDryRun, isFetchThin, isPushAtomic, isPushThin, isRemoveDeletedRefs, open, open, open, open, open, open, open, openAll, openAll, openAll, openAll, push, push, register, setCheckFetchedObjects, setCredentialsProvider, setDryRun, setFetchThin, setFilterBlobLimit, setFilterSpec, setObjectChecker, setOptionReceivePack, setOptionUploadPack, setPackConfig, setPushAtomic, setPushOptions, setPushThin, setRemoveDeletedRefs, setTagOpt, setTimeout, unregister
static final TransportProtocol PROTO_SSH
TransportGitSsh(Repository local, URIish uri)
TransportGitSsh(URIish uri)
private void initSshSessionFactory()
public FetchConnection openFetch() throws TransportException
If the transport has no local repository, the fetch connection can only be used for reading remote refs.
openFetch
in class Transport
TransportException
- the remote connection could not be established.public PushConnection openPush() throws TransportException
openPush
in class Transport
TransportException
- the remote connection could not be establishedjava.lang.String commandFor(java.lang.String exe)
void checkExecFailure(int status, java.lang.String exe, java.lang.String why) throws TransportException
TransportException
NoRemoteRepositoryException cleanNotFound(NoRemoteRepositoryException nf, java.lang.String why)
private static boolean useExtSession()