loadcreds

package
v1.0.81 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitCredentialsFile

func GitCredentialsFile() (string, error)

GitCredentialsFile returns the location of the git credentials file

Types

type Credentials

type Credentials struct {
	ServerURL string
	Username  string
	Password  string
	Token     string
}

Credentials the loaded credentials

func GetServerCredentials

func GetServerCredentials(credentials []Credentials, serverURL string) Credentials

GetServerCredentials returns the credentials for the given server URL or an empty struct

func LoadGitCredential

func LoadGitCredential() ([]Credentials, error)

LoadGitCredentialsFile loads the git credentials from the `git/credentials` file in `$XDG_CONFIG_HOME/git/credentials` or in the `~/git/credentials` directory

func LoadGitCredentialsFile

func LoadGitCredentialsFile(fileName string) ([]Credentials, error)

loadGitCredentialsAuthFile loads the git credentials file

Jump to

Keyboard shortcuts

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