首页 > 其他分享 >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解决方法

时间:2023-09-04 16:37:50浏览次数:40  
标签:Taps git -- directory add Error 128 homebrew

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

标签:Taps,git,--,directory,add,Error,128,homebrew
From: https://www.cnblogs.com/yongfengnice/p/17677411.html

相关文章

  • 应用对接gitlab api
    公司有个项目需要对接gitlab相关api。1gitlab登陆gitlab提供给我们oauth2登陆接口。我们可以通过这个接口实现gitlab认证登陆,并返回给我们一个token作为系统登录凭证。官网:https://docs.gitlab.com/ee/integration/oauth_provider.html首先,gitlab上申请一个ApplicationID,后......
  • git submodule 子模块的管理和使用
    Git子模块是Git仓库中的一个特殊类型的存储库,允许您将一个Git仓库嵌套在另一个Git仓库中。这对于管理项目的依赖或者在多个项目之间共享代码非常有用。以下是有关如何管理和使用Git子模块的一些基本操作:添加子模块要将子模块添加到您的Git仓库中,可以使用以下命令:gitsubmodule......
  • git 设置记住密码和清除密码
    git设置记住密码和清除密码 1.永久记住密码该命令会记住密码,执行一次gitpull或gitpush等需要输入密码的命令,输入一次密码,之后就都不必再输入了gitconfig--globalcredential.helperstore复制2.设置记住密码(默认有效期为15分钟)每15分钟会......
  • 记遇到的一次system error问题,主要还是ArrayList的线程安全问题
    1、问题:今天在进行页面点击的时候,突然出现了个systemerror弹出提示,而且经过多次点击之后,发现并不是每次都会有这个报错,很偶然的才会有一次报错,所以首先想到应该是跟多线程有关,不然不可能出现随机的错误2、解决:所以就去看日志,发现报错的是这个地方:Arrays.sort(taskTimes);在......
  • git 命令合集 没事给自己看的
    gitremote命令  gitremote-v 作用是显示所有远程仓库  gitremoteshowxx(xx为远程地址的别名)显示某个远程仓库的信息 gitremoteadd[name][url] 作用是添加远程版本库 gitremotermname  gitremoterenameold_namenew_name TRANSLATE......
  • git 错误 Reinitialized existing Git repository
      find.-name".git"rm-rf./.git参考:https://blog.csdn.net/sinat_28375239/article/details/112786267......
  • 这可能是Github上最全面的Flutter教程,带你玩转Flutter
    Flutter是什么来头?Flutter是一款开源UI工具包,可利用单一代码库构建本地编译的移动、Web和桌面应用程序。Flutter由谷歌牵头开发,允许开发者构建出具有良好表现力、灵活设计、样式美观且运行迅速的应用程序。Flutter的核心语言为Dart,这是一种现代多范式语言,能够面向多个平台......
  • Error
    Error当运行时错误产生时,Error对象会被抛出。Error对象也可用于用户自定义的异常的基础对象。#实例属性#message错误消息。对于用户创建的Error对象,这是构造函数的第一个参数提供的字符串。#cause导致该错误的具体原始原因。在捕获错误时,我们可能会使用更具体或更加实用......
  • 基于Hugo的github个人博客的搭建
    一、前期准备以windows系统为例1.下载Git(https://git-scm.com/downloads)2.下载Hugo(https://github.com/gohugoio/hugo/releases)按照自己电脑下。3.设置环境变量:打开环境变量可以看到在系统变量有一个变量名为PATH的变量,直接点击然后编辑,把自己的git和hugo的位置添加进去。注意不是......
  • git 的使用
    由于在工作中需要git来对开发的程序进行版本管理,便于追溯,个人学习了一些基本指令和操作流程,做如下记录。本篇内容是基于pro-git这份教程进行学习的。实用基本操作如下指令可以在vscode中可视化操作gitclonelinkgitaddfile/.修改文件保留在暂存区gitcommit-m"注释"......