GitSSHFetcher

class GitSSHFetcher[source]
classmethod fetch(cls, git_host, repo_info, use_cache=False, commit=None, silent=True)[source]

Fetches git repo by SSH protocol

Parameters
  • git_host (str) – host address of git repo. Eg: github.com

  • repo_info (str) – a string with format "repo_owner/repo_name[:tag_name/:branch_name]" with an optional tag/branch. The default branch is master if not specified. Eg: "brain_sdk/MegBrain[:hub]"

  • use_cache (bool) – whether to use locally fetched code or completely re-fetch.

  • commit (Optional[str]) – commit id on github or gitlab.

  • silent (bool) – whether to accept the stdout and stderr of the subprocess with PIPE, instead of displaying on the screen.

Return type

str

Returns

directory where the repo code is stored.