When using a composer with a private VCS, it infinitely requests authorization

In my composer.json, I have a private vcs repository:

{
    "type": "vcs",
    "url": "https://github.com/username/repo.git"
}

When I call php composer.phar update, I get the following:

Your GitHub credentials are required to fetch private repository metadata (https://github.com/username/repo.git)
The credentials will be swapped for an OAuth token stored in /root/.composer/config.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications

Username: myusername
Password:
    Authentication required (api.github.com):
      Username: myusername
      Password:
    Authentication required (api.github.com):
      Username: myusername
      Password:
    Authentication required (api.github.com):
      Username:

It doesn't matter how many times I invest in my github credentials that it sets. If I'm wrong, it does the same, no errors or max attempts.

Any ideas what might cause this? I use the latest version as retrievable at startup:

php composer.phar self-update

WORK AROUND

As work at the moment, I went to: https://github.com/settings/applications and generated the marker manually, and then ran:

php composer.phar config -g github-oauth.github.com <token>

But I still would like to know why he couldn’t do it automatically

+4
source share
1

, aa74818fe00c5f5eb57c1c38b807e9e2950c670c GitHubs 2. , , , .

, .

+3

Source: https://habr.com/ru/post/1527999/


All Articles