ZBLOG

==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Warning: Error searching on GitHub: GitHub API Error: Requires authentication The GitHub credentia

根据错误信息,Homebrew 无法在 GitHub 上搜索已删除的公式,并且提示您需要创建一个个人访问令牌。请按照以下步骤解决此问题:

  1. 打开终端并执行以下命令以清除 macOS 中的 GitHub 凭据:
  1. printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase
  1. 转到 https://github.com/settings/tokens/new?scopes=gist,repo,workflow&description=Homebrew 并创建一个新的 GitHub 个人访问令牌。

  2. 在“Token description”字段中输入任何描述性文本以标识此 token。

  3. 在“Select scopes”部分中选择 “gist”,“repo”和“workflow”。

  4. 点击 “Generate token” 按钮以生成新的个人访问令牌。

  5. 复制生成的令牌值(字符串)。

  6. 在终端中输入以下命令将该 token 添加到您的 shell 配置文件(例如 ~/.zshrc)中:

  1. echo 'export HOMEBREW_GITHUB_API_TOKEN=your_token_here' >> ~/.zshrc
  1. 将上面命令中 your_token_here 替换为您在第五步中复制的 token 值。

  2. 重新加载 shell 配置文件使更改生效:

  1. source ~/.zshrc
  1. 现在尝试再次运行 Homebrew 命令,应该不会再看到先前出现的错误信息。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=5248

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?