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

Method Login

pkg/cmd/auth/shared/login_flow_test.go:31–36  ·  view source on GitHub ↗
(host, username, token, gitProtocol string, encrypt bool)

Source from the content-addressed store, hash-verified

29type tinyConfig map[string]string
30
31func (c tinyConfig) Login(host, username, token, gitProtocol string, encrypt bool) (bool, error) {
32 c[fmt.Sprintf("%s:%s", host, "user")] = username
33 c[fmt.Sprintf("%s:%s", host, "oauth_token")] = token
34 c[fmt.Sprintf("%s:%s", host, "git_protocol")] = gitProtocol
35 return false, nil
36}
37
38func (c tinyConfig) LoginRefreshable(host, username string, credential gh.Credential, gitProtocol string, encrypt bool) (bool, error) {
39 c[fmt.Sprintf("%s:%s", host, "user")] = username

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected