Friday, November 22, 2024

R package installation error: API rate limit exceeded for

 Error: Failed to install 'unknown package' from GitHub:

  HTTP error 403.

  API rate limit exceeded for XXXXX. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)


  Rate limit remaining: 0/60

  Rate limit reset at: 2024-11-21 15:45:55 UTC


  To increase your GitHub API rate limit

  - Use `usethis::create_github_token()` to create a Personal Access Token.

  - Use `gitcreds::gitcreds_set()` to add the token.



https://github.com/r-lib/remotes/issues/210#issuecomment-934661415

Got the same issue and solved by following this link https://gist.github.com/z3tt/3dab3535007acf108391649766409421

Need to set up GitHub account to avoid this rate limit error.

  1. Run in R, usethis::create_github_token()
  2. On pop-up website, generate and copy your own taken
  3. Run in R, credentials::set_github_pat("YourPATinStep2")
  4. Verify setting in R, usethis::git_sitrep()
  5. Run in R, remotes::install_github('the repo you want to install')

No comments:

Post a Comment