class documentation

Git client that connects over SSH.

Class Method from_parsedurl Create an SSHGitClient from a parsed URL.
Method __init__ Initialize SSHGitClient.
Method get_url Get the SSH URL for a path.
Instance Variable alternative_paths Undocumented
Instance Variable host Undocumented
Instance Variable key_filename Undocumented
Instance Variable password Undocumented
Instance Variable port Undocumented
Instance Variable ssh_command Undocumented
Instance Variable ssh_vendor Undocumented
Instance Variable username Undocumented
Method _connect Create a connection to the server.
Method _get_cmd_path Undocumented

Inherited from TraditionalGitClient:

Method archive Request an archive of a specific commit.
Method fetch_pack Retrieve a pack from a git smart server.
Method get_refs Retrieve the current refs from a git smart server.
Method send_pack Upload a pack to a remote repository.
Constant DEFAULT_ENCODING Undocumented
Instance Variable protocol_version Undocumented
Instance Variable _remote_path_encoding Undocumented
Instance Variable _report_status_parser 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_with_bundle_uri Fetch into a target repository, using bundle URIs for bootstrap.
Static Method _should_send_pack Undocumented
Static Method _warn_filter_objects Undocumented
Method _handle_receive_pack_tail Handle the tail of a 'git-receive-pack' request.
Method _negotiate_receive_pack_capabilities Undocumented
Method _negotiate_upload_pack_capabilities Undocumented
Instance Variable _fetch_capabilities Undocumented
Instance Variable _report_activity Undocumented
Instance Variable _send_capabilities 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:

Create an SSHGitClient from a parsed URL.

Parameters
parsedurl:ParseResultResult of urlparse()
thin_packs:boolWhether or not thin packs should be retrieved
report_activity:Callable[[int, str], None] | NoneOptional callback for reporting transport activity
quiet:boolWhether to suppress progress output
include_tags:boolWhether to include tags
dumb:boolWhether to use dumb protocol (not used for SSHGitClient)
username:str | NoneSSH username
password:str | NoneSSH password
config:Config | NoneConfiguration object
path_encoding:strEncoding for paths
vendor:SSHVendor | NoneSSH implementation to use
key_filename:str | NoneOptional SSH key file
ssh_command:str | NoneOptional custom SSH command
Returns
SSHGitClientAn 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:strSSH hostname
port:int | NoneOptional SSH port
username:str | NoneOptional username
vendor:SSHVendor | NoneOptional SSH vendor
config:Config | NoneOptional configuration
password:str | NoneOptional password
key_filename:str | NoneOptional SSH key file
ssh_command:str | NoneOptional custom SSH command
path_encoding:strEncoding for paths (default: utf-8)
thin_packs:boolWhether or not thin packs should be retrieved
report_activity:Callable[[int, str], None] | NoneOptional callback for reporting transport activity
quiet:boolWhether to suppress output
include_tags:boolSend annotated tags when sending the objects they point to
def get_url(self, path: str) -> str:

Get the SSH URL for a path.

alternative_paths: dict[bytes, bytes] =

Undocumented

host =

Undocumented

key_filename =

Undocumented

password =

Undocumented

port =

Undocumented

ssh_command =

Undocumented

ssh_vendor =

Undocumented

username =

Undocumented

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:bytesThe git service name to which we should connect.
path:str | bytesThe path we should pass to the service. (as bytestirng)
protocol_version:int | NoneDesired Git protocol version. By default the highest mutually supported protocol version will be used.
Returns
tuple[Protocol, Callable[[], bool], IO[bytes] | None]Undocumented
def _get_cmd_path(self, cmd: bytes) -> bytes:

Undocumented