asdf-vm / asdf

Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
https://asdf-vm.com/
MIT License
21.65k stars 775 forks source link

bug: Github 403 API rate limit exceed #1589

Closed rogerioefonseca closed 1 year ago

rogerioefonseca commented 1 year ago

Describe the Bug

While trying to install a plugin via asdf I;m receiving the Rate Limit error: Installing azurerm plugin... Failed to install a plugin; Failed to fetch GitHub releases: GET https://api.github.com/repos/terraform-linters/tflint-ruleset-azurerm/releases/tags/v0.24.0: 403 API rate limit exceeded for <>. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 7m20s]

Not sure how could I use GITHUB_TOKEN in the process

Steps to Reproduce

1 - Check the rate limit remaining with curl -I https://api.github.com/users/octocat/orgs

image 2 - In a terminal, try to install asdf plugins multiple times asdf plugin add terraform-docs asdf plugin remove terraform-docs 3 - The rate limit will be reached, and the error will be triggered

Expected Behaviour

Install the plugin without errors

Actual Behaviour

The installation cannot be completed because the API rate limit is reached

Environment

OS:
Linux MACHINE 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
zsh 5.8 (x86_64-ubuntu-linux-gnu)

ASDF VERSION:
v0.10.2-7e7a1fa

ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/home/USER/.asdf

ASDF INSTALLED PLUGINS:
pre-commit                   https://github.com/jonathanmorley/asdf-pre-commit.git master 26bfc42
terraform-docs               https://github.com/looztra/asdf-terraform-docs.git master acfd01c
tflint                       https://github.com/skyzyx/asdf-tflint.git master 37e7eb9

asdf plugins affected (if relevant)

No response

rogerioefonseca commented 1 year ago

My bad, git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" this will solve