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

Function login

pkg/cmd/auth/token/token_test.go:488–492  ·  view source on GitHub ↗
(t *testing.T, c gh.Config, hostname, username, token, gitProtocol string, secureStorage bool)

Source from the content-addressed store, hash-verified

486}
487
488func login(t *testing.T, c gh.Config, hostname, username, token, gitProtocol string, secureStorage bool) {
489 t.Helper()
490 _, err := c.Authentication().Login(hostname, username, token, gitProtocol, secureStorage)
491 require.NoError(t, err)
492}
493
494// setupLegacyUnkeyedKeyringState recreates the state a very old gh install leaves behind: an active user is recorded
495// for github.com, but the only keyring token lives in the legacy unkeyed slot rather than a per-user slot. It logs in

Callers 4

TestTokenRunFunction · 0.70
TestTokenRunRefreshFunction · 0.70

Calls 3

HelperMethod · 0.65
LoginMethod · 0.65
AuthenticationMethod · 0.65

Tested by

no test coverage detected