composer asking oauth token for download public repo composer asking oauth token for download public repo php php

composer asking oauth token for download public repo


This has nothing to do with public vs. private GitHub repositories. You're hitting GitHub's API rate limit.

From Composer's troubleshooting guide:

API rate limit and OAuth tokens

Because of GitHub's rate limits on their API it can happen that Composer prompts for authentication asking your username and password so it can go ahead with its work.

If you would prefer not to provide your GitHub credentials to Composer you can manually create a token using the following procedure:

  1. Create an OAuth token on GitHub. Read more on this.
  2. Add it to the configuration running composer config -g github-oauth.github.com <oauthtoken>

Now Composer should install/update without asking for authentication.