Skip to content

Instantly share code, notes, and snippets.

@dhargitai
Last active November 9, 2024 22:29
Show Gist options
  • Save dhargitai/19eaeb6e71e6862d5343 to your computer and use it in GitHub Desktop.
Save dhargitai/19eaeb6e71e6862d5343 to your computer and use it in GitHub Desktop.
Stop Composer asking for GitHub credentials

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:

Create an OAuth token on GitHub.

Add it to the configuration running composer config -g github-oauth.github.com <oauthtoken>

Now Composer should install/update without asking for authentication.

@adampatterson
Copy link

Thanks!

@gtu-myowin
Copy link

It works!

@AsifMian
Copy link

AsifMian commented Dec 4, 2022

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment