MCPcopy Create free account
hub / github.com/docker/cli / getAuthConfigKey

Function getAuthConfigKey

cli/config/configfile/file.go:44–49  ·  view source on GitHub ↗

getAuthConfigKey returns the canonical key used to look up stored registry credentials for the given registry domain. For the official Docker Hub registry ("docker.io"), credentials are stored under the historical full index address ("https://index.docker.io/v1/"). For all other registries, the in

(domainName string)

Source from the content-addressed store, hash-verified

42//
43// [registry.GetAuthConfigKey]: https://pkg.go.dev/github.com/docker/docker@v28.5.1+incompatible/registry#GetAuthConfigKey
44func getAuthConfigKey(domainName string) string {
45 if domainName == "docker.io" || domainName == "index.docker.io" {
46 return authConfigKey
47 }
48 return domainName
49}
50
51// ConfigFile ~/.docker/config.json file info
52type ConfigFile struct {

Callers 2

GetCredentialsStoreMethod · 0.70
GetAuthConfigMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…