Skip to content
Discussion options

You must be logged in to vote

Run docker logout ghcr.io.

The 401 from curl is actually normal: the Docker registry v2 spec always returns a 401 challenge so the client knows to fetch a bearer token from the realm URL (https://ghcr.io/token). For public images, clients fetch an anonymous token from there.

The reason Docker failed with denied: denied is that you have stale or expired credentials saved for ghcr.io in ~/.docker/config.json. Docker automatically sends those saved credentials instead of pulling anonymously, and GHCR rejects them. Once you log out, the pull succeeds anonymously.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tcely
Comment options

Answer selected by tcely
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended Packages Host your dependencies, libraries, and production-ready code, right from your repository Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
3 participants