tsloughter / beamup

Install and control active BEAM languages and components
https://tsloughter.github.io/beamup/
Apache License 2.0
48 stars 2 forks source link

Support API tokens to avoid API rate limit errors from GitHub #42

Open fhunleth opened 2 months ago

fhunleth commented 2 months ago

On machines that make a lot of GitHub requests, beamup can fail with this message:

$ beamup install elixir latest
Error: Failed fetching Github release latest from elixir-lang/elixir

Caused by:
   0: GitHub
   1: API rate limit exceeded for w.x.y.z. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
      Documentation URL: https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting

Location:
    src/github.rs:185:29

To avoid this, it would be nice if beamup could be passed an API token via the GITHUB_TOKEN or GH_TOKEN environment variables (https://cli.github.com/manual/gh_help_environment).