Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidRemoteURL = errors.New("invalid remote git URL")
ErrInvalidRemoteURL is returned when a URL is not an accepted remote git URL.
var ErrNotInstalled = errors.New("git is not installed; please install git from https://git-scm.com")
ErrNotInstalled is returned when git is not found in PATH.
Functions ¶
func CloneRemote ¶
CloneRemote clones the remote repository at url into dir. The URL is checked with ValidateRemoteURL and git is restricted to the https, http, ssh and git transports. If tag is non-empty, checks out that tag or branch.
func ValidateRemoteURL ¶
ValidateRemoteURL reports whether url is a remote git URL that is safe to pass to git clone. Accepted forms are https://, http://, ssh:// and git:// URLs and scp-like [user@]host:path addresses. Options (values starting with '-'), transport helpers (<transport>::<address>), file:// URLs and local paths are rejected.
Types ¶
This section is empty.