Skip to content

Conversation

nathanhammond
Copy link

Two colleagues of mine spent a combined six hours yesterday trying to figure out why their custom registry was not working only to discover that it was due to the non-inclusion of Bearer as the authorization scheme in the Authorization header.

This PR is intended to present one possible path forward as a strawman for conversation in #15021.

@rustbot rustbot added A-registries Area: registries A-registry-authentication Area: registry authentication and authorization (authn authz) A-sparse-registry Area: http sparse registries labels Sep 19, 2025
@epage
Copy link
Contributor

epage commented Sep 19, 2025

Some notes on contributing:

  • We'll want to see end-to-end tests for anything not already covered
    • We prefer new tests to be added in the commit before the fix with them passing, showing the current behavior. This will mean that the commit that improves the error message will also update the test, making between them show how behavior changed
  • We rely on rustc's suggestion style guide which discourages questions

} else {
write!(
f,
"Your registry token is not prefixed with an embedded authorization scheme (e.g. `Bearer `).\n\

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 This messaging would have saved me on the first hit :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-registries Area: registries A-registry-authentication Area: registry authentication and authorization (authn authz) A-sparse-registry Area: http sparse registries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants