在新的laravel/homestead规定中使用GitHub OAuth令牌的Composer错误

Chr*_*sco 11 github composer-php laravel-5 homestead

全新安装了一个laravel/homestead流浪盒,按照文档,运行init.sh,配置Homestead.yaml和运行$ vagrant up; vagrant ssh.然后cd'编辑到项目的文件夹并运行composer install.

它挂起等待token以下消息

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing sebastian/diff (1.3.0)
Downloading: Connecting...
Could not fetch https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3, 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+homestead+2015-08-01+2140
to retrieve a token. It will be stored in "/home/vagrant/.composer/auth.json" for future use by Composer.
Token (hidden):
Run Code Online (Sandbox Code Playgroud)

我以前用过laravel/homestead,我从来没有做过这些,这是一些无证的新功能还是一个bug或者我做错了什么?

Rwd*_*Rwd 32

如果您还没有GitHub帐户,则需要创建一个GitHub帐户,然后按照此处的说明进行操作,然后复制该令牌.

获得令牌后,再次运行composer install,然后在提示时将其粘贴到令牌中.

  • 这解决了它.我只是为什么突然要求代币而感到困惑; 比如,我已经使用Laravel一年了,从来没有被问过令牌. (4认同)
  • 你突然不得不这样做的原因是,你之前从未必须这样做,因为你已经超过了Github API速率限制,目前是每小时60个请求. (2认同)

ken*_*orb 5

该错误意味着您已超出 IP 地址的 API 速率限制。

您可以: