Skip to content

fix(auth): do auth dance even when basic auth creds are not found #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 10, 2025

Conversation

whatsacomputertho
Copy link
Collaborator

In this PR, I remove the found condition from the if statement around the auth dances performed to fetch a token from the registry auth server. This condition required that the user provide basic auth creds in their initial request only for those creds to then fail on the initial request, with a 401 response sent back and a www-authenticate header instructing the client to fetch a token from the auth server. Some registries (such as ghcr.io) require this dance for all clients regardless of whether the image is public or private. Removing this condition seems to work now for public ghcr.io images.

For reference, see:

@whatsacomputertho whatsacomputertho merged commit 6b8b068 into main May 10, 2025
5 checks passed
@whatsacomputertho whatsacomputertho deleted the auth-fix branch May 10, 2025 13:28
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