Md *_*san 8 php github dependency-management composer-php
我的 PHP 项目依赖于一个不错的库php-sql-query-builder。但是,这个库有一个错误。所以我将库从 github 源分叉到我的 github 帐户https://github.com/mmuhasan/php-sql-query-builder并修复名为“ dev-where-bug-fix ”的分支中的错误。然后我更新了我的项目作曲家文件如下:
....
"repositories": [
{
"type": "vcs",
"url": "https://github.com/mmuhasan/php-sql-query-builder"
}
],
"require":{
"nilportugues/sql-query-builder" : "dev-where-bug-fix"
},
....
Run Code Online (Sandbox Code Playgroud)
当我运行composer update它时,它会要求一个 oAuth 令牌,如下所示:
Could not fetch https://api.github.com/repos/mmuhasan/php-sql-query-builder/contents/composer.json?ref=3dca30b0eaee835783fa61286a51dda425cd3838, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+LAPTOP-056S12EK+2018-03-27+1845 to retrieve a token.
Run Code Online (Sandbox Code Playgroud)
既然我的叉子是公开的,我希望它是公开的,为什么作曲家要问令牌。任何帮助将不胜感激。
Chr*_*ris 14
这与公共和私有 GitHub 存储库无关。您正在达到GitHub 的 API 速率限制。
API 速率限制和 OAuth 令牌
由于 GitHub 对其 API 的速率限制,Composer 可能会提示进行身份验证,询问您的用户名和密码,以便它可以继续其工作。
如果您不想向 Composer 提供您的 GitHub 凭据,您可以使用以下过程手动创建令牌:
- 在 GitHub 上创建OAuth 令牌。阅读更多相关信息。
- 将其添加到正在运行的配置中
composer config -g github-oauth.github.com <oauthtoken>现在 Composer 应该在不要求身份验证的情况下安装/更新。
| 归档时间: |
|
| 查看次数: |
6789 次 |
| 最近记录: |