loadcreds

package
v1.0.88 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BootSecretName    = "jx-boot"
	OperatorNamespace = "jx-git-operator"
)

Variables

This section is empty.

Functions

func FindOperatorCredentials added in v1.0.82

func FindOperatorCredentials() (credentialhelper.GitCredential, error)

FindOperatorCredentials detects the git operator secret so we have default credentials

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