Open
Description
openedon Dec 23, 2022
Describe the bug
When searching for 'containers/auth.json', in go-containerregistry/pkg/authn/keychain.go, the environment variable XDG_RUNTIME_DIR should be replaced with XDG_CONFIG_HOME and if missing with $HOME/.config.
See: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
So
f, err := os.Open(filepath.Join(os.Getenv("XDG_RUNTIME_DIR"), "containers/auth.json"))
Should be
f, err := os.Open(filepath.Join(os.Getenv("XDG_CONFIG_HOME"), "containers/auth.json"))
and
f, err := os.Open(filepath.Join(os.Getenv("HOME"), ".config/containers/auth.json"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment