loadcreds

package
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func FindGitCredentialsFromSecret added in v3.0.19

func FindGitCredentialsFromSecret(secretName string) (credentialhelper.GitCredential, error)

FindGitCredentialsFromSecret detects the git secrets using a secret name

func FindOperatorCredentials

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, bool, 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