git pull not recognize result: fatal: detected dubious ownership in repository
时间: 2024-04-27 19:20:24 浏览: 238
git init xxxx的时候报错: fatal: git 1.7.2 or later
4星 · 用户满意度95%
由于项目所有者变更导致git文件夹权限错乱,无法进行git操作,报错信息为"fatal: detected dubious ownership in repository". 解决这个问题的方法有两种,一种是通过输入命令"git config --global --add safe.directory <repository_path>"来添加对该目录的例外,例如"git config --global --add safe.directory F:/IdeaTestWorkSpace/2021/ZQMQ" [1 [3。另一种方法是通过输入命令"git config --global --add safe.directory <repository_path>"来添加对所有git仓库的例外,但这需要在每个git仓库中单独操作,且可能会导致git config列表中出现一长串的操作记录。所以你可以选择根据具体情况选择其中一种方法来解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [git pull拉取报错fatal: detected dubious ownership in repository](https://blog.csdn.net/BovinLee/article/details/130100997)[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: 33.333333333333336%"]
- *2* [【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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *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: 33.333333333333336%"]
[ .reference_list ]
阅读全文