MCPcopy
hub / github.com/cli/cli / ActiveToken

Method ActiveToken

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

ActiveToken will retrieve the active auth token for the given hostname, searching environment variables, general configuration, and finally encrypted storage.

(hostname string)

Source from the content-addressed store, hash-verified

109 // ActiveToken will retrieve the active auth token for the given hostname, searching environment variables,
110 // general configuration, and finally encrypted storage.
111 ActiveToken(hostname string) (token string, source string)
112
113 // HasEnvToken returns true when a token has been specified in an environment variable, else returns false.
114 HasEnvToken() bool

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls