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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章