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

Method ActiveToken

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

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

Implementers 1

AuthConfiginternal/config/config.go

Calls

no outgoing calls