如果你没有添加 GitHub 密钥的话,composer update 会提示你登录:
Could not fetch https://api.github.com/graphql, 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+test_00+2018-12-07+0655
to retrieve a token. It will be stored in "/root/.config/composer/auth.json" for future use by Composer.
Token (hidden):
Invalid token provided.
You can also add it manually later by using "composer config --global --auth github-oauth.github.com <token>"
[Composer\Downloader\TransportException]
Could not authenticate against github.com
解决办法就是:
进入 https://github.com/settings/tokens 点击 「Generate new token」 新建一个 Token,选择默认新建就行,然后就会得到一个 Token,然后输入这个值就 OK 。