Composer error with GitHub OAuth token on fresh laravel/homestead provision

You'll need to create a GitHub account if you don't already have one and then follow the instruction here and then copy the token.

Once you've got your token, run composer install again and then paste the token in when it prompts you for it.


The error means that you have exceeded the API rate limit for your IP address.

You can either:

  • wait a bit and re-try again,
  • change your IP address (e.g. by connecting via proxy or VPN),
  • specify your authentication token as suggested by the message:

    Please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo

    and pass into your Composer command or add it manually into ~/.composer/auth.json, e.g.

    {
        "http-basic": {},
        "github-oauth": {
            "github.com": "__TOKEN__"}
    }
    

    Note: On Windows, it's in %APPDATA%/Composer.

    or add the settings manually by the following commands (as per this comment):

    composer config -g --unset github-oauth.api.github.com
    composer config -g github-oauth.github.com __TOKEN__