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

Method ActiveToken

internal/gh/gh.go:144–144  ·  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

142 // ActiveToken will retrieve the active auth token for the given hostname, searching environment variables,
143 // general configuration, and finally encrypted storage.
144 ActiveToken(hostname string) (token string, source string)
145
146 // ActiveTokenType reports what kind of credential the active token for the
147 // hostname is, so a caller can decide whether it will do without handling

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls