# Functions
No description provided by the author
CloneRepo will clone the repository at the given URL into the given path.
DecodeBase64PrivateKey attempts to decode a base64 encoded private key and returns an ssh.Signer.
LogHostKeyCallback is a HostKeyCallback that just logs host keys and does nothing else.
No description provided by the author
ReadPrivateKey attempts to read an SSH private key from path and returns an ssh.Signer.
SetupRepoAuth determines the desired AuthMethod based on options.GitURL:
| Git URL format | GIT_USERNAME | GIT_PASSWORD | Auth Method | | ------------------------|--------------|--------------|-------------| | https?://host.tld/repo | Not Set | Not Set | None | | https?://host.tld/repo | Not Set | Set | HTTP Basic | | https?://host.tld/repo | Set | Not Set | HTTP Basic | | https?://host.tld/repo | Set | Set | HTTP Basic | | file://path/to/repo | - | - | None | | path/to/repo | - | - | None | | All other formats | - | - | SSH |
For SSH authentication, the default username is "git" but will honour GIT_USERNAME if set.
ShallowCloneRepo will clone the repository at the given URL into the given path with a depth of 1.
# Structs
No description provided by the author