美文网首页
2023-08-11

2023-08-11

作者: shalapovar | 来源:发表于2023-08-10 16:44 被阅读0次

brew update无法正常使用

解决方案

运行如下命令添加 Git 信任目录homebrew-core、homebrew-cask、homebrew-services

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-services

同样如果要取消之前添加的 Git 信任目录运行如下命令即可

git config --global --unsetsafe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core

git config --global --unsetsafe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask

git config --global --unsetsafe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-services

运行如下命令可查看 Git 全局配置

git config --global --list

相关文章

  • 2023-08-11 - 草稿

    关于写作与阅读的一点思考。 在这个漫长的道路上,倏忽而过的岁月中,自修而健而进是必修的长期课目。 愿在这喧杂的烟火...

网友评论

      本文标题:2023-08-11

      本文链接:https://www.haomeiwen.com/subject/ovdzpdtx.html