Documentation
¶
Overview ¶
Package auth maps forge credentials to safe Git HTTPS configuration.
Index ¶
Constants ¶
View Source
const ( SCMGitHub = "github" SCMGitLab = "gitlab" SCMBitbucket = "bitbucket" )
SCM name constants for Credential.SCM and InferSCM.
Variables ¶
This section is empty.
Functions ¶
func GitConfigArgs ¶
func GitConfigArgs(cred Credential) []string
Build authenticated Git HTTPS header args for http.extraHeader. Empty token yields nil.
func RedactToken ¶
RedactToken returns a safe placeholder when token is non-empty.
Types ¶
type Credential ¶
type Credential struct {
Token string
SCM string // github, gitlab, bitbucket, or empty for GitHub-style default
}
Credential is a forge-scoped HTTPS token for Git smart HTTP.
Click to show internal directories.
Click to hide internal directories.