解决fatal: detected dubious ownership in repository

git错误提示:fatal: detected dubious ownership in repository

                fatal: detected dubious ownership in repository at 'D:/Git'
                'D:/Git' is owned by:
                BUILTIN/Administrators (S-1-5-32-544)
                but the current user is:
                COOLL/Lenovo (S-1-5-21-332913961-1909816967-542526052-1001)
                To add an exception for this directory, call:

                git config --global --add safe.directory D:/Git

大概翻译过来就是 致命错误:检测到仓库中存在可疑的所有权问题”(其实就是权限问题)

解决方案:

选择git仓库的文件夹右键属性——安全——高级

所有者和当前Windows登录账号不一样——更改——高级

选择立即查找——找到当前帐号——确定

勾选选项——确定

子文件夹一起更改

更改后的效果

  • 13
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"fatal: detected dubious ownership in repository" 是 Git 出现的错误信息,意味着在仓库中发现了可疑的所有权问题。根据引用和引用的内容,可能需要进行以下解决方法: 1. 方法一:通过运行命令 `git config --global --add safe.directory C:/Users/21077/vue_shop` 来解决当前的 Git 仓库的问题。然而,这种方法只能解决当前的仓库,其他的仓库也需要同样操作。同时,使用 `git config -l` 命令,你会发现很多类似的操作。具体步骤可以参考引用中提到的博主的文章。中提到的博主的解决方法是一个可行的尝试,建议你参考并进行相应的操作来解决这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [使用git时出现的一些问题整理](https://blog.csdn.net/qq_45956730/article/details/127303234)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [【Git】 fatal: detected dubious ownership in repository 解决方法](https://blog.csdn.net/weixin_52954097/article/details/128875480)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值