Documentation
¶
Index ¶
- func ClearAuthFields(cfg config.Config, hostname string) error
- func ClearOAuth2Fields(cfg config.Config, hostname string) error
- type GitCredentialFlow
- func (gc *GitCredentialFlow) Prompt(ctx context.Context, io *iostreams.IOStreams, hostname, protocol string) error
- func (gc *GitCredentialFlow) Setup(hostname, protocol, username, authToken string) error
- func (gc *GitCredentialFlow) SetupHelper(hostname, protocol string) error
- func (gc *GitCredentialFlow) ShouldSetup() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearAuthFields ¶ added in v1.92.0
ClearAuthFields removes all authentication-related config entries for the given hostname. It does not touch non-auth settings such as git_protocol, api_host, or api_protocol.
Types ¶
type GitCredentialFlow ¶
type GitCredentialFlow struct {
Executable string
// contains filtered or unexported fields
}
func (*GitCredentialFlow) Setup ¶
func (gc *GitCredentialFlow) Setup(hostname, protocol, username, authToken string) error
func (*GitCredentialFlow) SetupHelper ¶ added in v1.124.0
func (gc *GitCredentialFlow) SetupHelper(hostname, protocol string) error
SetupHelper configures glab as the Git credential helper for hostname without prompting, for callers that already know the user's intent: a non-interactive login cannot answer Prompt, but still needs Git to authenticate. It is safe to run again: the host key is rewritten rather than appended to, whatever the executable is called.
func (*GitCredentialFlow) ShouldSetup ¶
func (gc *GitCredentialFlow) ShouldSetup() bool
Click to show internal directories.
Click to hide internal directories.