MCPcopy Create free account
hub / github.com/cli/cli / Login

Method Login

internal/gh/gh.go:185–185  ·  view source on GitHub ↗

Login will set user, git protocol, and auth token for the given hostname. If the encrypt option is specified it will first try to store the auth token in encrypted storage and will fall back to the general insecure configuration.

(hostname, username, token, gitProtocol string, secureStorage bool)

Source from the content-addressed store, hash-verified

183 // If the encrypt option is specified it will first try to store the auth token
184 // in encrypted storage and will fall back to the general insecure configuration.
185 Login(hostname, username, token, gitProtocol string, secureStorage bool) (insecureStorageUsed bool, err error)
186
187 // SwitchUser switches the active user for a given hostname.
188 SwitchUser(hostname, user string) error

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls