使用homebrew 的时候失败fatal: not in a git directory Error: Command failed with exit 128: git

2022年07月11日 • 阅读 2848
使用homebrew 的时候失败fatal: not in a git directory Error: Command failed with exit 128: git解决方法。 亲测有效

使用homebrew 的时候失败fatal: not in a git directory Error: Command failed with exit 128: git

解决方法。 亲测有效


执行brew -v 命令看看是不是有两个提示,你的 homebrew-core和homebrew-cask目录 被git认为不是一个安全的目录,需要手动添加
git config --global --add safe.directory 你的homebrew-core路径
git config --global --add safe.directory 你的homebrew-cask路径


你需要复制的路径为:

截屏2022-06-04 08.22.56.png


一共两个地址,像上图一样,设置一下git config 即可。

本文由青舟模板网发布,如若转载,请注明出处:http://qingzo.com/jishu/machomebrew.html
相关推荐
评论列表

共有0条评论来说两句吧...

欢迎 发表评论: