解决 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 .
相关推荐
九狼8 小时前
Flutter URL Scheme 跨平台跳转
人工智能·flutter·github
逛逛GitHub10 小时前
4 个热门的 GitHub 开源项目
github
程序员鱼皮14 小时前
GitHub 关注突破 2w,我总结了 10 个涨星涨粉技巧!
前端·后端·github
HelloGitHub17 小时前
《HelloGitHub》第 119 期
开源·github
冬奇Lab1 天前
一天一个开源项目(第35篇):GitHub Store - 跨平台的 GitHub Releases 应用商店
开源·github·资讯
Jahzo1 天前
openclaw桌面端体验--ClawX
人工智能·github
逛逛GitHub1 天前
6个粉丝推荐的 GitHub 项目,收藏一波。
github
MaoPou2 天前
Hello Haxe篇
github