fatal: detected dubious ownership in repository at 'G:/Git'
时间: 2023-09-03 21:14:29 浏览: 146
git fatal detected dubious ownership in repository 的解决方法.rar
这个错误提示是由于在Git仓库中检测到了不确定的所有权问题导致的。在引用和引用中,这个问题是由于在重置Windows 10后更改了用户名所致。根据这些引用中的建议,你可以通过在Git Bash中运行以下命令来解决该问题:
git config --global --add safe.directory G:/Git
这个命令将在Git的全局配置中添加一个安全目录的例外,以解决这个问题。然而,需要注意的是,这个解决方法仅适用于当前的Git仓库,如果你有其他的Git仓库也出现了相同的问题,你需要针对每个仓库都执行相同的操作。此外,运行git config -l命令可能会显示一长串的这些操作,但这不会影响Git的正常运行。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Git异常fatal: detected dubious ownership in repository at](https://blog.csdn.net/weixin_43359484/article/details/130624732)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [git fatal: detected dubious ownership in repository 解决方法](https://blog.csdn.net/tcjy1000/article/details/127129224)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文