解决 fatal: detected dubious ownership in repository at ‘XXXX‘ 问题

重装系统后,重新下载git之后,出现了这个问题:

复制代码
fatal: detected dubious ownership in repository at 'V:/Web/Github_commit/Interview'

这个错误表明 Git 检测到仓库的所有者和当前用户不一致,这可能被视为一个安全风险。要解决这个问题,可以将该目录标记为"安全目录"

解决步骤

复制代码
// step 1
git config --global --add safe.directory 'V:/Web/Github_commit/Interview'

// step 2
git config --global --get-all safe.directory

// step 3
git add .
相关推荐
CoderJia程序员甲3 小时前
GitHub 热榜项目 - 日榜(2025-08-14)
ai·github·开源项目·github热榜
猫头虎4 小时前
猫头虎AI分享|一款Coze、Dify类开源AI应用超级智能体快速构建工具:FastbuildAI
人工智能·开源·prompt·github·aigc·ai编程·ai-native
我是哪吒4 小时前
分布式微服务系统架构第165集:阿里,字节,腾讯架构经验汇总
后端·面试·github
GoGeekBaird6 小时前
GoHumanLoopHub开源上线,开启Agent人际协作新方式
人工智能·后端·github
草梅友仁17 小时前
草梅 Auth 1.4.0 发布与 ESLint v9 更新 | 2025 年第 33 周草梅周报
vue.js·github·nuxt.js
寻月隐君18 小时前
硬核实战:从零到一,用 Rust 和 Axum 构建高性能聊天服务后端
后端·rust·github
CoderJia程序员甲21 小时前
GitHub 热榜项目 - 日榜(2025-08-16)
人工智能·ai·开源·github
python_1361 天前
web请求和响应
java·spring·github
一宿君1 天前
Github 9 个惊艳的开源 NL2SQL 项目
sql·nlp·github
x10n91 天前
GitHub宕机时的应急协作方案
github