Composer & GitHub Authentication

If you receive a Composer error similar to Could not authenticate against github.com, this usually means you are hitting API rate limits.

You'll most likely run into this issue when installing a new Statamic site or Starter Kit. It'll look something like this:

Could not authenticate against github.com
Error installing starter kit [statamic/multisimplicity].

Or maybe this:

- Installing statamic/cms (3.2.1)
Downloading: connection... Failed to download statamic/cms from dist: Could not authenticate against github.com`
Now trying to download from source

To get around this, you can create a personal access token within a GitHub's user settings. For installing open source projects via Composer, GitHub doesn't need any scopes or permissions, just an authenticated user. This means you can leave every single box unchecked, unless using private repositories.

Once the personal access token is created, you can add the following to the project before running the composer command again:

composer config github-oauth.github.com {your-personal-access-token-here}
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →