解决 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 .
相关推荐
Resistance丶未来13 分钟前
Agency-Agents 多智能体协作系统落地指南
python·大模型·nlp·github·copilot·claude·gemini
輕華40 分钟前
YOLOv5 实战:从 GitHub 拉取到自定义数据集训练
yolo·github
海域云-罗鹏3 小时前
豆包开启付费订阅,想白嫖越来越难了,企业不如部署自己的算力服务器
服务器·人工智能·github
遁神银灵子3 小时前
OMO(oh-my-openagents)插件在OpenCode Desktop v1.4.33以上版本失效问题研究
github
码流怪侠5 小时前
【GitHub】TextGen:开源本地大模型运行平台的终极解决方案
python·程序员·github
小雨青年5 小时前
GitHub Copilot Commit Message 生成与自定义配置优化指南
人工智能·github·copilot
无限进步_5 小时前
【C++】AVL树完全解析:从平衡因子到四种旋转
c语言·开发语言·数据结构·c++·后端·算法·github
华万通信king6 小时前
2026 年 GitHub AI 趋势周报:Skills 生态崛起,Agent 框架去中心化
人工智能·去中心化·github
逛逛GitHub7 小时前
GitHub 上 3.7 万的 Star,终端里浏览文件的开源工具。
github
GISer_Jing7 小时前
基于 GitHub Actions 端到端工程化落地——AI全栈项目实战案例
人工智能·github