解决 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 .
相关推荐
极智-99613 分钟前
GitHub 热榜项目 · 日榜精选(2026-01-06)
github·开源项目·技术趋势·开发者工具
数据大魔方1 小时前
【期货量化实战】日内动量策略:顺势而为的短线交易法(Python源码)
开发语言·数据库·python·mysql·算法·github·程序员创富
小龙3 小时前
【Git 报错解决】本地分支与远程分支名称/提交历史不匹配
大数据·git·elasticsearch·github
想用offer打牌7 小时前
一站式讲清Spring AI Alibaba的OverAllState和RunnableConfig
人工智能·架构·github
逛逛GitHub10 小时前
推荐 5 个小众但有趣的 GitHub 开源项目。
github
极智-99610 小时前
GitHub 热榜项目 · 日榜精选(2026-01-07) | protobuf、web-check、PowerToys等
github·开发工具·开源项目·数据交互·ai框架
Tfly__13 小时前
Ubuntu20.04安装Genesis(最新)
linux·人工智能·pytorch·ubuntu·github·无人机·强化学习
程序员的程13 小时前
我做了一个前端股票行情 SDK:stock-sdk(浏览器和 Node 都能跑)
前端·npm·github
fandroid13 小时前
在GitHub上fork项目后,fork仓库与远程源仓库同步,网页端无法同步时,用命令行强制同步
github
双层吉士憨包14 小时前
掌握Facebook BM 提升广告账户稳定性
github