class documentation
class SSHGitClient(TraditionalGitClient):
Constructors: SSHGitClient.from_parsedurl(parsedurl, thin_packs, report_activity, quiet, ...), SSHGitClient(host, port, username, vendor, ...)
Git client that connects over SSH.
| Class Method | from |
Create an SSHGitClient from a parsed URL. |
| Method | __init__ |
Initialize SSHGitClient. |
| Method | get |
Get the SSH URL for a path. |
| Instance Variable | alternative |
Undocumented |
| Instance Variable | host |
Undocumented |
| Instance Variable | key |
Undocumented |
| Instance Variable | password |
Undocumented |
| Instance Variable | port |
Undocumented |
| Instance Variable | ssh |
Undocumented |
| Instance Variable | ssh |
Undocumented |
| Instance Variable | username |
Undocumented |
| Method | _connect |
Create a connection to the server. |
| Method | _get |
Undocumented |
Inherited from TraditionalGitClient:
| Method | archive |
Request an archive of a specific commit. |
| Method | fetch |
Retrieve a pack from a git smart server. |
| Method | get |
Retrieve the current refs from a git smart server. |
| Method | send |
Upload a pack to a remote repository. |
| Constant | DEFAULT |
Undocumented |
| Instance Variable | protocol |
Undocumented |
| Instance Variable | _remote |
Undocumented |
| Instance Variable | _report |
Undocumented |
Inherited from GitClient (via TraditionalGitClient):
| Method | clone |
Clone a repository. |
| Method | close |
Close the client and release any resources. |
| Method | fetch |
Fetch into a target repository. |
| Method | fetch |
Fetch into a target repository, using bundle URIs for bootstrap. |
| Static Method | _should |
Undocumented |
| Static Method | _warn |
Undocumented |
| Method | _handle |
Handle the tail of a 'git-receive-pack' request. |
| Method | _negotiate |
Undocumented |
| Method | _negotiate |
Undocumented |
| Instance Variable | _fetch |
Undocumented |
| Instance Variable | _report |
Undocumented |
| Instance Variable | _send |
Undocumented |
def from_parsedurl(cls, parsedurl:
ParseResult, thin_packs: bool = True, report_activity: Callable[ [ int, str], None] | None = None, quiet: bool = False, include_tags: bool = False, dumb: bool = False, username: str | None = None, password: str | None = None, config: Config | None = None, path_encoding: str = TraditionalGitClient.DEFAULT_ENCODING, vendor: SSHVendor | None = None, key_filename: str | None = None, ssh_command: str | None = None) -> SSHGitClient:
¶
overrides
dulwich.client.GitClient.from_parsedurlCreate an SSHGitClient from a parsed URL.
| Parameters | |
parsedurl:ParseResult | Result of urlparse() |
thinbool | Whether or not thin packs should be retrieved |
reportCallable[ | Optional callback for reporting transport activity |
quiet:bool | Whether to suppress progress output |
includebool | Whether to include tags |
dumb:bool | Whether to use dumb protocol (not used for SSHGitClient) |
username:str | None | SSH username |
password:str | None | SSH password |
config:Config | None | Configuration object |
pathstr | Encoding for paths |
vendor:SSHVendor | None | SSH implementation to use |
keystr | None | Optional SSH key file |
sshstr | None | Optional custom SSH command |
| Returns | |
SSHGitClient | An SSHGitClient instance |
def __init__(self, host:
str, port: int | None = None, username: str | None = None, vendor: SSHVendor | None = None, config: Config | None = None, password: str | None = None, key_filename: str | None = None, ssh_command: str | None = None, path_encoding: str = TraditionalGitClient.DEFAULT_ENCODING, thin_packs: bool = True, report_activity: Callable[ [ int, str], None] | None = None, quiet: bool = False, include_tags: bool = False):
¶
Initialize SSHGitClient.
| Parameters | |
host:str | SSH hostname |
port:int | None | Optional SSH port |
username:str | None | Optional username |
vendor:SSHVendor | None | Optional SSH vendor |
config:Config | None | Optional configuration |
password:str | None | Optional password |
keystr | None | Optional SSH key file |
sshstr | None | Optional custom SSH command |
pathstr | Encoding for paths (default: utf-8) |
thinbool | Whether or not thin packs should be retrieved |
reportCallable[ | Optional callback for reporting transport activity |
quiet:bool | Whether to suppress output |
includebool | Send annotated tags when sending the objects they point to |
def _connect(self, cmd:
bytes, path: str | bytes, protocol_version: int | None = None) -> tuple[ Protocol, Callable[ [], bool], IO[ bytes] | None]:
¶
Create a connection to the server.
This method is abstract - concrete implementations should implement their own variant which connects to the server and returns an initialized Protocol object with the service ready for use and a can_read function which may be used to see if reads would block.
| Parameters | |
cmd:bytes | The git service name to which we should connect. |
path:str | bytes | The path we should pass to the service. (as bytestirng) |
protocolint | None | Desired Git protocol version. By default the highest mutually supported protocol version will be used. |
| Returns | |
tuple[ | Undocumented |