Github 安装 yii php 框架时出现身份验证问题
Github authentication issue while installing yii php framework
我尝试安装 yii
php 框架。我使用以下命令安装该框架:
1. composer global require "fxp/composer-asset-plugin:~1.0"
2. composer create-project yiisoft/yii2-app-advanced advanced 2.0.2
这是输出:
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:
我不明白为什么 github
一次又一次地问我 github username
和 password
。我认为 OAuth token
将存储在 /home/<username>/.composer/auth.json
文件中。为什么它不被重用?
乍一看,这似乎是 Composer 的一个错误。幸运的是,Composer 背后的团队正在不断改进它并发布新版本。
使用 composer self-update
更新 Composer 可能会解决问题。
在这种情况下,OP 在上面的评论中报告说它有效。
您需要登录您的 GitHub 帐户。然后在 https://github.com/settings/tokens/new 处创建具有所需范围的新令牌。生成的令牌可以在安装 Yii2 时作为 OAuth 令牌提供。
我尝试安装 yii
php 框架。我使用以下命令安装该框架:
1. composer global require "fxp/composer-asset-plugin:~1.0"
2. composer create-project yiisoft/yii2-app-advanced advanced 2.0.2
这是输出:
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:
我不明白为什么 github
一次又一次地问我 github username
和 password
。我认为 OAuth token
将存储在 /home/<username>/.composer/auth.json
文件中。为什么它不被重用?
乍一看,这似乎是 Composer 的一个错误。幸运的是,Composer 背后的团队正在不断改进它并发布新版本。
使用 composer self-update
更新 Composer 可能会解决问题。
在这种情况下,OP 在上面的评论中报告说它有效。
您需要登录您的 GitHub 帐户。然后在 https://github.com/settings/tokens/new 处创建具有所需范围的新令牌。生成的令牌可以在安装 Yii2 时作为 OAuth 令牌提供。