homebrew安装软件出现git问题fatal: not in a git directory,Error: Command failed with exit 128: git解决方法
homebrew安装软件出现git问题
问题
fatal: not in a git directory
Error: Command failed with exit 128: git
问题查找
1. brew -v 查看问题log
suyf@suyfdeMac-mini ~ % brew -v
Homebrew 4.0.18-18-g64259a4
fatal: detected dubious ownership in repository at '/opt/homebrew/Library/Taps/homebrew/homebrew-core'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
Homebrew/homebrew-core (no Git repository)
fatal: detected dubious ownership in repository at '/opt/homebrew/Library/Taps/homebrew/homebrew-cask'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew/homebrew-cask (no Git repository)
解决方法
1. 解决方法已经在问题提示里面了。
第一步执行: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
分类:
android-mac
标签:
android-mac
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库