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.comrepo_info (
str) – a string with format"repo_owner/repo_name[:tag_name/:branch_name]"with an optional tag/branch. The default branch ismasterif not specified. Eg:"brain_sdk/MegBrain[:hub]"use_cache (
bool) – whether to use locally fetched code or completely re-fetch.silent (
bool) – whether to accept the stdout and stderr of the subprocess with PIPE, instead of displaying on the screen.
- Return type
- Returns
directory where the repo code is stored.