Skip to content

Search the Podman config home and DOCKER_CONFIG for credentials - #2

Merged
andreaTP merged 1 commit into
roastedroot:mainfrom
andreaTP:fix-podman-auth-config-home
Sep 17, 2026
Merged

andreaTP merged 1 commit into
roastedroot:mainfrom
andreaTP:fix-podman-auth-config-home

Conversation

@andreaTP

Copy link
Copy Markdown

AuthStore only looked for the Podman auth file under $XDG_RUNTIME_DIR. On macOS podman login writes 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

  • I have read and understood the CONTRIBUTING guide
  • I have run mvn license:update-file-header, mvn spotless:apply, pre-commit run -a, mvn clean install before opening the PR

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
andreaTP force-pushed the fix-podman-auth-config-home branch from 656a59e to 27f2028 Compare September 17, 2026 10:03
@andreaTP
andreaTP merged commit a851884 into roastedroot:main Sep 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant