wshanshi:這是一個簡單的問題總結(jié)記錄…
一、異常信息
使用brew install 時發(fā)現(xiàn)報了一個錯:fatal: not in a git directory Error: Command failed with exit 128: git,如下圖所示。
二、解決方法
brew -v 可查看提示,To add an exception for this directory。提示添加安全目錄(–add safe.directory)
文章來源:http://www.zghlxwxcb.cn/news/detail-626849.html
執(zhí)行上述提示命令即可:文章來源地址http://www.zghlxwxcb.cn/news/detail-626849.html
git config --global --add safe.directory /opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-cask
到了這里,關(guān)于解決:mac brew install xx 出現(xiàn) fatal: not in a git directory Error: Command failed with exit 128: git的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!