解决 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 .
相关推荐
tod1131 小时前
TCP全连接队列与tcpdump抓包
网络·网络协议·tcp/ip·github·tcpdump
Luck_ff08101 小时前
百度指数数据采集与可视化平台 BaiduIndexHunter
github·开源软件
阿里嘎多学长2 小时前
2026-02-03 GitHub 热点项目精选
开发语言·程序员·github·代码托管
子兮曰9 小时前
OpenClaw入门:从零开始搭建你的私有化AI助手
前端·架构·github
m0_694845571 天前
tinylisp 是什么?超轻量 Lisp 解释器编译与运行教程
服务器·开发语言·云计算·github·lisp
June`1 天前
muduo项目排查错误+测试
linux·c++·github·muduo网络库
weixin_6681 天前
GitHub 2026年AI项目详细数据汇总表-AI分析-分享
人工智能·github
CoderJia程序员甲2 天前
GitHub 热榜项目 - 日榜(2026-02-05)
ai·开源·大模型·github·ai教程
weixin_6682 天前
GitHub 2026年AI项目热度分析报告-AI分析-分享
人工智能·github
MicrosoftReactor2 天前
技术速递|GitHub Copilot CLI 斜杠命令速查表
github·copilot·cli