The GitHub credentials in the macOS keychain may be invalid.

Error: GitHub 
The GitHub credentials in the macOS keychain may be invalid.
Clear them with:
  printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase
Or create a personal access token:
  https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"

解決辦法

1 打開發網址
https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew

2 點擊最下方的 Generate token

這裏寫圖片描述

4 生成token

這裏寫圖片描述

5 回到終端 執行

export HOMEBREW_GITHUB_API_TOKEN="生成的token"

6OK

發佈了229 篇原創文章 · 獲贊 12 · 訪問量 21萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章