- 其他类型
- 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
![](/uploads/article/2017/10/17/20171017110236_8042.jpg)
#### 3生成token
![](/uploads/article/2017/10/17/20171017110457_2699.jpeg)
#### 4 回到终端 执行
export HOMEBREW_GITHUB_API_TOKEN="生成的token"