1. 程式人生 > >composer update Token error

composer update Token error

如果你沒有新增 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 。

From Tag