Search the Podman config home and DOCKER_CONFIG for credentials - #2
Merged
Merged
Conversation
podman login on macOS writes to ~/.config/containers/auth.json and never sets XDG_RUNTIME_DIR, so those credentials were never found. Fixes roastedroot/inlay#4
andreaTP
force-pushed
the
fix-podman-auth-config-home
branch
from
September 17, 2026 10:03
656a59e to
27f2028
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AuthStore only looked for the Podman auth file under $XDG_RUNTIME_DIR. On macOS
podman loginwrites to ~/.config/containers/auth.json and never sets XDG_RUNTIME_DIR, so stored credentials were invisible and pulls from private registries failed to authenticate.Mirror the read order of containers/image (pkg/docker/config/config.go), the library podman logs in with: the Docker config, then $XDG_CONFIG_HOME/containers/auth.json (defaulting to ~/.config), then $XDG_RUNTIME_DIR/containers/auth.json when set. Config.load lets later files win, so this yields the same effective precedence containers/image applies. The Docker config directory now also honours $DOCKER_CONFIG.
The existing tests gained explicit removals of XDG_CONFIG_HOME and DOCKER_CONFIG so an ambient value cannot redirect the lookup.
Reported in roastedroot/inlay#4
Description
Testing done
Submitter checklist
mvn license:update-file-header,mvn spotless:apply,pre-commit run -a,mvn clean installbefore opening the PR