-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Expand token error messages with potential fix information. #15985
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
base: master
Are you sure you want to change the base?
Expand token error messages with potential fix information. #15985
Conversation
8d54a17
to
98df98b
Compare
Some notes on contributing:
|
} else { | ||
write!( | ||
f, | ||
"Your registry token is not prefixed with an embedded authorization scheme (e.g. `Bearer `).\n\ |
There was a problem hiding this comment.
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 :)
98df98b
to
efe120c
Compare
efe120c
to
5fcc082
Compare
} | ||
} | ||
|
||
token_error_messages! { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@epage: since this whole PR is basically test cases followed by a tiny bit of string manipulation, would you mind taking an incremental look at just the test commit?
(the tests pass, auth_required
on crates.io I've not yet attempted to discover if publish --workspace
can support both crates.io and custom registries simultaneously. Regardless, I started with the cross-product to fully enumerate behavior.)
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 theAuthorization
header.This PR is intended to present one possible path forward as a strawman for conversation in #15021.