git

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitHttpBasicAuth

func InitHttpBasicAuth(username, password string) error

Set HTTP basic authentication user and password.

func InitSshKey

func InitSshKey(privateKeyFileContent []byte, password string) error

Set the ssh private key in PEM format to use for authentication. If needed provide the password.

Types

type ClonedRepo

type ClonedRepo struct {
	Repo     *git.Repository
	LocalDir string
	Auth     transport.AuthMethod
}

func CloneRepo

func CloneRepo(url string) (*ClonedRepo, error)

Clone a given repository and return it. The url can be given in these formats: file://<path> -> path to repository in local filesystem git@<remote repo> -> ssh repository clone URL http(s)://<remote repo>

func (*ClonedRepo) Cleanup

func (repo *ClonedRepo) Cleanup() error

Deletes any local content in TempDir.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL