繁体   English   中英

安装yii php框架时的Github身份验证问题

[英]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 usernamepassword 我以为OAuth token将存储在/ /home/<username>/.composer/auth.json文件中。 为什么不重复使用?

乍一看,这似乎是Composer的错误。 幸运的是,Composer背后的团队正在不断对其进行改进并发布新版本。

使用composer self-update更新更新Composer可能会解决此问题。

在这种情况下,OP在上面的评论中报告了它的工作原理。

您需要登录到GitHub帐户。 然后在https://github.com/settings/tokens/new上创建具有所需范围的新令牌。 可以在安装Yii2时将生成的令牌作为OAuth令牌提供。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM