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.
Transport.Operation
DEFAULT_FETCH_THIN, DEFAULT_PUSH_THIN, local, REFSPEC_PUSH_ALL, REFSPEC_TAGS, uri
Modifier and Type | Method and Description |
---|---|
FetchConnection |
openFetch()
Begins a new connection for fetching from the remote repository.
|
FetchConnection |
openFetch(Collection<RefSpec> refSpecs,
String... additionalPatterns)
Begins a new connection for fetching from the remote repository.
|
PushConnection |
openPush()
Begins a new connection for pushing into the remote repository.
|
close, getSession, getSshSessionFactory, setSshSessionFactory
applyConfig, fetch, 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
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 FetchConnection openFetch(Collection<RefSpec> refSpecs, String... additionalPatterns) throws NotSupportedException, TransportException
Transport
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 RefSpec
s and the
additional patterns, if any, are used to restrict the server's ref
advertisement to matching refs only.
Transports that want to support git protocol V2 must override
this; the default implementation ignores its arguments and calls
Transport.openFetch()
.
openFetch
in class Transport
refSpecs
- that will be fetched via
FetchConnection.fetch(ProgressMonitor, Collection, java.util.Set, OutputStream)
lateradditionalPatterns
- that will be set as ref prefixes if the server supports git
protocol V2; null
values are ignoredNotSupportedException
- the implementation does not support fetching.TransportException
- the remote connection could not be established.public PushConnection openPush() throws TransportException
openPush
in class Transport
TransportException
- the remote connection could not be establishedCopyright © 2022 Eclipse JGit Project. All rights reserved.