Ajay Kulkarni Ajay Kulkarni - 2 months ago 16
PHP Question

Github authentication issue while installing yii php framework

I tried to install

yii
php framework. I used the following commands to install that framework:

1.
composer global require "fxp/composer-asset-plugin:~1.0"


2.
composer create-project yiisoft/yii2-app-advanced advanced 2.0.2


This was the output:

Installing yiisoft/yii2-app-advanced (2.0.2)
- Installing yiisoft/yii2-app-advanced (2.0.2)
Downloading: 100%

Created project in advanced
Loading composer repositories with package information
Installing dependencies (including require-dev)
Reading bower.json of bower-asset/jquery.inputmask (3.1.50)
Could not fetch https://api.github.com/repos/RobinHerbots/jquery.inputmask/contents/bower.json?ref=f44d5deec804c72fe85da31819b18bdcdad26f65, enter your GitHub credentials to go over the API rate limit
The credentials will be swapped for an OAuth token stored in /home/ajay/.composer/auth.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username: akulkarni9
Password:
Token successfully created

Could not fetch https://api.github.com/authorizations, enter your GitHub credentials to go over the API rate limit
The credentials will be swapped for an OAuth token stored in /home/ajay/.composer/auth.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username: akulkarni9
Password:
An existing OAuth token for Composer is present and will be reused

Could not fetch https://api.github.com/authorizations, enter your GitHub credentials to go over the API rate limit
The credentials will be swapped for an OAuth token stored in /home/ajay/.composer/auth.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username: akulkarni9
Password:
An existing OAuth token for Composer is present and will be reused

Could not fetch https://api.github.com/authorizations, enter your GitHub credentials to go over the API rate limit
The credentials will be swapped for an OAuth token stored in /home/ajay/.composer/auth.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username:


I don't understand why
github
keeps asking me again and again for my github
username
and
password
. I thought that
OAuth token
will be stored in
/home/<username>/.composer/auth.json
file. Why isn't it being reused?

Answer

At first glance this looks like a bug with Composer. Luckily, the team behind Composer is continually improving it and releasing new versions.

Updating Composer with composer self-update is likely to fix the problem.

In this case the OP reported in comments above that it worked.