当前位置:   article > 正文

brew update 错误解决。git: ‘credential-osxkeychain‘ is not a git command._git: 'credential-osxkeychain' is not a git command

git: 'credential-osxkeychain' is not a git command. see 'git --help'.

问题

今天想升级一下 MBP 的系统,使用命令如下

  1. brew update
  2. git: 'credential-osxkeychain' is not a git command. See 'git --help'.
  3. git: 'credential-osxkeychain' is not a git command. See 'git --help'.
  4. fatal: could not read Username for 'https://github.com': terminal prompts disabled

然后就没有然后了,系统 update 就卡在这里。

解决方法

感谢万能的 google,通过 google 搜索出了很多内容,以下是我的解决步骤。

确认 git 是最新版本

brew upgrade git

确认 credential-osxkeychain 已经安装

git credential-osxkeychain

设置 open authentication assistant

git config --global credential.helper osxkeychain

再次 update

下面是我再次 update 的输出。

  1. % brew update
  2. git: 'credential-osxkeychain' is not a git command. See 'git --help'.
  3. git: 'credential-osxkeychain' is not a git command. See 'git --help'.
  4. fatal: could not read Username for 'https://github.com': terminal prompts disabled
  5. brew untap homebrew/homebrew-scienError: homebrew/homebrew-science does not exist! Run `brew untap homebrew/homebrew-science` to remove it.

从上面的输出,可以看出,一个包出问题了,而且也告诉你使用 brew untap homebrew/homebrew-science 来删除这个包。

  1. % brew untap homebrew/homebrew-science
  2. Untapping homebrew/science...
  3. Untapped (86 files, 7MB).

删除这个包。再次 update,将得到如下的 Log。

  1. % brew update
  2. Already up-to-date.

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/207868
推荐阅读
相关标签
  

闽ICP备14008679号