Skip to content

Improve error message for unauthenticated error #3093

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 6 commits into from
Jun 21, 2024

Conversation

oliversun9
Copy link
Contributor

@oliversun9 oliversun9 commented Jun 17, 2024

This improves the error message when a BSR token is found in netrc but not valid, distinguishing it from the case where it's not found.

Fixes #2500

Message for no netrc entry and no BUF_TOKEN:

Failure: you are not authenticated for bufbuild.internal. Set the BUF_TOKEN environment variable or run "buf registry login bufbuild.internal", using a Buf API token as the password. For details, visit https://buf.build/docs/bsr/authentication

Invalid netrc entry:

Failure: your Buf API token for buf.build is invalid. Run "buf registry login" using a valid Buf API token. For details, visit https://buf.build/docs/bsr/authentication

Invalid BUF_TOKEN:

Failure: the BUF_TOKEN environment variable is set, but is not valid. Set BUF_TOKEN to a valid Buf API token, or unset it. For details, visit https://buf.build/docs/bsr/authentication

@oliversun9 oliversun9 requested review from bufdev and doriable June 17, 2024 18:09
@oliversun9 oliversun9 requested a review from bufdev June 19, 2024 19:18
@oliversun9 oliversun9 requested a review from bufdev June 20, 2024 15:56
@oliversun9 oliversun9 merged commit 28408f4 into main Jun 21, 2024
9 checks passed
@oliversun9 oliversun9 deleted the osun/unauthenticated-error-message branch June 21, 2024 04:09
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.

Improve unauthenticated error message
3 participants