brew安装时fatal: not in a git directory Error: Command failed with exit 128: git
使用brew安装node时发生此错误
猜测原因:
应该是homebrew没有找到git路径,因此我们需要配置一下
ps: 查阅资料大多都是直接git绑定usr/local/路径下面的homebrew,这里我们需要配置自己本地的路径
解决方案
查找Homebrew安装位置
- 这里我使用的是
find / -name "homebrew-cask"
- 找到以下类似路径
- 这里建议打开此目录看下与此目录同级是否为以下三个目录
- 这里我使用的是
git绑定homebrew路径
- git config --global --add safe.directory
自己的homebrew-core目录
- git config --global --add safe.directory
自己的homebrew-cask目录
- git config --global --add safe.directory
查看是否完成添加
git config --global --list
这样就算是配置成功了。
ps:如果之前有配置过其他的directory,建议找到.gitconfig删除其他的
查找gitconfig命令:git config --global --list --show-origin
brew安装时fatal: not in a git directory Error: Command failed with exit 128: git相关推荐
- fatal: not in a git directory Error: Command failed with exit 128: git
arch -arm64 brew install cocoapods 报错 fatal: not in a git directory Error: Command failed with exit ...
- brew安装报错:fatal: not in a git directory Error: Command failed with exit 128: git
1.使用命令brew -v,存在两个提示 2.执行提示的两个命令即可 git config --global --add safe.directory /usr/local/Homebrew/Libr ...
- Mac安装 git-lfs 出现 Command failed with exit 128: git
fatal: not in a git directory Error: Command failed with exit 128: git 在 brew install git-lfs 的时候,出现 ...
- Vue3运行源码-调试报错:Command failed with exit code 128: git rev-parse HEAD
Vue3运行源码-调试报错:Command failed with exit code 128: git rev-parse HEAD 下载源码 运行源码 运行源码报错 成功运行 下载源码 官网下载源 ...
- Android studio2.3小米8.5.1不能安装应用,没有MIUI优化,打开USB安装时提示“请插入SIM卡”,安装时手机没有任何反应,studio报Installation failed w
今天升级了MIUI后,Android studio2.3小米8.5.1不能安装应用,手机红米2a,没有MIUI优化,打开USB安装时提示"请插入SIM卡",安装时手机没有任何反应, ...
- ERROR Error loading vue.config.js ERROR Error Command failed git describe --always报错可能的原因
最近使用git clone了一个前后端分离的项目,前端启动当中遇到了一个问题,使用node.jsnpm run serve命令以及yarn run serve启动前端项目会报错,尝试过下载已经安装完依 ...
- Mac安装webpack报错gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1解决
安装webpack ,报错提示 gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ER ...
- git push error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403
这是远程链接错误,请求不到服务器 解决办法:找项目管理员帮你开push权限就可以了 参考链接: git push error: RPC failed; HTTP 403 curl 22 The req ...
- git clone: error:RPC failed;result=18,HTTP code = 200 MiB | 2.00 KiB/s解决办法
在windows上git clone时,出现 error: RPC failed; result=18, HTTP code = 200 MiB | 2.00 KiB/s fatal: The rem ...
最新文章
- 判断android应用程序是否已安装
- vCenter功能基本介绍
- LCD1602液晶显示模块的单片机驱动深入详解之硬件篇
- 设置tomcat 编译文件位置【转】
- PHP 5.4.8 添加系统服务命令
- gdb define command
- es7.3.2中文+拼音分词 排除同音字
- 快速批量改变图片格式
- html弹窗代码大全定时弹窗,js点击弹窗弹出表单框代码
- javascript当中iframe的用法
- [四年前写的诗]夜有流星兩
- 无需编码 9款优秀的数据地图可视化工具平台
- 微信公众号搜索公众号列表 API
- oracle 取现在的时间,Oracle 获取当前日期及日期格式
- Winows笔记本设置合上盖子不休眠
- 魔法诗~~~一套基于Vue开发的实用、高端、炫酷的响应式前端网页!!!
- 自主创新进展制造世界主要轴承制作强国
- Dell 服务器 无线网卡,家庭无线互联方案:DELL 戴尔 发布 WiGig无线坞
- 每一份“热”都有价值
- 我们的手机用上北斗导航了吗?