Skip to content
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

Show better error when PAT can't authenticate to a private server #6871

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

deivid-rodriguez
Copy link
Member

What was the end-user or developer problem that led to this PR?

Bundler does not help a lot newbie users trying to configure a private gem server.

What is your fix for the problem, implemented in this PR?

Hopefully give better error messages.

Before:

Fetching gem metadata from https://rubygems.org/........
Fetching source index from https://rubygems.pkg.github.com/my-org/

Bad username or password for https://x-access-token@rubygems.pkg.github.com/my-org/.
Please double-check your credentials and correct them.

After:

Fetching gem metadata from https://rubygems.org/........
Fetching source index from https://rubygems.pkg.github.com/my-org/

Access token could not be authenticated for https://x-access-token@rubygems.pkg.github.com/my-org/.
Make sure it's valid and has the necessary scopes configured.

Make sure the following tasks are checked

Before:

```
Fetching gem metadata from https://rubygems.org/........
Fetching source index from https://rubygems.pkg.github.com/my-org/

Bad username or password for https://x-access-token@rubygems.pkg.github.com/my-org/.
Please double-check your credentials and correct them.
```

After:

```
Fetching gem metadata from https://rubygems.org/........
Fetching source index from https://rubygems.pkg.github.com/my-org/

Access token could not be authenticated for https://x-access-token@rubygems.pkg.github.com/my-org/.
Make sure it's valid and has the necessary scopes configured.
```
@deivid-rodriguez deivid-rodriguez merged commit 556349f into master Aug 14, 2023
92 checks passed
@deivid-rodriguez deivid-rodriguez deleted the 403-explicit-message branch August 14, 2023 10:27
deivid-rodriguez added a commit that referenced this pull request Aug 17, 2023
Show better error when PAT can't authenticate to a private server

(cherry picked from commit 556349f)
deivid-rodriguez added a commit to dependabot/dependabot-core that referenced this pull request Nov 8, 2023
Wording of some errors was changed at
rubygems/rubygems#6871, so needed some tweaks.
deivid-rodriguez added a commit to dependabot/dependabot-core that referenced this pull request Nov 9, 2023
Wording of some errors was changed at
rubygems/rubygems#6871, so needed some tweaks.
deivid-rodriguez added a commit to dependabot/dependabot-core that referenced this pull request Nov 15, 2023
Wording of some errors was changed at
rubygems/rubygems#6871, so needed some tweaks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant