Friday, September 15, 2017

composer update error: please create GitHub OAuth token to go over the API rate limit

While performing a "composer update" today I ran into an odd error. A lot was dumped to the screen, but this is the important part:

please create a GitHub OAuth token to go over the API rate limit

After Googling around for a bit, I stumbled into the solution.
  1. First, create a "Personal Access Token" in your github account. If you don't have a github account, you'll need one so sign up. Here's how you create that token: How to create a Personal Access Token on GitHub
  2. Make sure you copy this access token down. It is *only* display after creation. Once you leave that page, you will never be able to view it again at GitHub. I keep a copy of mine in my Dashlane Secure Notes section - use whatever tool you prefer.
  3. In your project root, enter this:

    composer config --global github-oauth.github.com <TOKEN>

    where <TOKEN> is the access token you created in step 1 above.

No comments:

Post a Comment