Skip to content
Discussion options

You must be logged in to vote

@fabianvallon-db
Not a bug — this is expected OCI distribution behavior, and GHCR does support anonymous access for public packages, but it needs the token-exchange step first rather than a PAT sent straight as Authorization: Bearer.

Every /v2/... endpoint on GHCR (and on most OCI-compliant registries) always answers unauthenticated requests with 401 + a WWW-Authenticate challenge, regardless of whether the package is public. That's by spec — you're expected to follow the challenge, not treat the 401 as a hard "no." If you check the response headers on your original request, you'll see something like:

www-authenticate: Bearer realm="https://ghcr.io/token",service="ghcr.io",scope="reposito…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by fabianvallon-db
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
2 participants