MCPcopy Index your code
hub / github.com/cli/cli / SetDefaultHost

Method SetDefaultHost

internal/config/config.go:347–351  ·  view source on GitHub ↗

SetDefaultHost will override any host resolution and return the given host and source for all calls to DefaultHost. Use for testing purposes only.

(host, source string)

Source from the content-addressed store, hash-verified

345// SetDefaultHost will override any host resolution and return the given
346// host and source for all calls to DefaultHost. Use for testing purposes only.
347func (c *AuthConfig) SetDefaultHost(host, source string) {
348 c.defaultHostOverride = func() (string, string) {
349 return host, source
350 }
351}
352
353// Login will set user, git protocol, and auth token for the given hostname.
354// If the encrypt option is specified it will first try to store the auth token

Callers 2

Calls

no outgoing calls

Tested by 2