Issues article

Home >> Issues >>

  Fix composer update failure due to GitHub authorization

I was doing a composer update on a Laravel 5 installation and I was encountering this error repeatedly. Heres the error that I was receiving

Could not fetch, enter your GitHub credentials to go over the API rate limit
The credentials will be swapped for an OAuth token stored in /Users/username/.composer/auth.json, your password will not be stored
To revoke access to this token you can visit
Username: username
An existing OAuth token for Composer is present and will be reused

Luckily I found this issue on composer's GitHub very quick, and it solved my issues for me.

You will need to get a token that is connected to your GitHub account by following this simple guide that was provided by GitHub

You can also get the git token by following the steps which have given in below image.

Once you got your token, you can add that in composer.json like below and then do composer update

 "config": {
  "github-oauth": {
   "": "your-git-token"


You saved my time

Well done You saved my time

  2 years ago      Naveen Kumar      

Write your comment now