The GitHub credentials in the macOS keychain may be invalid.

来源:互联网 发布:java 伪静态化 编辑:程序博客网 时间:2024/05/22 14:43
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 eraseOr create a personal access token:  https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrewand 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

0 0