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

HTTPForbidden Error when upgrading bun when GitHub API usage limit is exhausted #9104

Closed
rootCircle opened this issue Feb 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rootCircle
Copy link

What version of Bun is running?

1.0.29+a146856d1

What platform is your computer?

Linux 6.7.5-arch1-1 x86_64 unknown

What steps can reproduce the bug?

  1. Exhaust your unauthenticated GitHub API keys. One way to do this is to :

    for i in $(seq 0 60); do 
    curl -fsSL https://api.github.com/repos/oven-sh/bun/releases/latest
    done # Don't abuse this, for good

    Don't worry this will automatically reset in 1 hour as mentioned here.

  2. Run bun --upgrade from your terminal

This issue arrives even if you're on the latest version of terminal

What is the expected behavior?

The error could be more descriptive, instead of just HTTPForbidden possibly, as switching networks and/or waiting for just 1 hr can still solve the issue as mentioned later also.

What do you see instead?

Bun upgrade failed with error: HTTPForbidden

Please upgrade manually:
  curl -fsSL https://bun.sh/install | bash

Additional information

Possible resolutions could include :

  1. Recommend user to change to alternate network provider/VPN as rate limit are imposed per IP.
  2. Recommend user to use GitHub Token. (Looking through the code, I believe it is supported, but I am not sure regarding this)
  3. Recommend user to wait for 1 hour till Rate limit resets.
  4. Don't do anything! (Current message still does sort of works in those situations, so it depends)
@rootCircle rootCircle added the bug Something isn't working label Feb 25, 2024
@Jarred-Sumner
Copy link
Collaborator

Jarred-Sumner commented Feb 25, 2024

Unfortunately, there's very little we can do about this.

If you set the environment variable GITHUB_ACCESS_TOKEN to a GitHub API token it will use that instead for authenticated requests.

The only other solution really is to move off of GitHub releases which we might do in the future but we aren't doing that right now

You can also install Bun via npm.

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2024
haunt98 added a commit to haunt98/dotfiles that referenced this issue May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants