解决 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 .
相关推荐
Htht1112 小时前
【Github】之【Bug】一直无法连接github的ssh
ssh·github·bug
掘金安东尼3 小时前
🧠什么样的智能体才算“真正能干活”?
人工智能·llm·github
WebInfra5 小时前
Rspack 加入 Next.js 生态:携手改进前端工具链
前端·javascript·github
梦醒三叹6 小时前
自动化 Markdown 图片上传到 GitHub
运维·自动化·github
nan_black6 小时前
在conda虚拟环境安装GIT并且克隆github上项目指南(解决443问题)
git·github·conda
uhakadotcom7 小时前
使用Logtail将FastAPI应用日志上传到阿里云SLS的简单步骤
后端·面试·github
零零壹117 小时前
Apipost自定义函数深度实战:灵活处理参数值秘籍
算法·面试·github
前端付杰7 小时前
BFG Repo-Cleaner 教程:快速清理 Git 仓库中的敏感数据和大文件
javascript·git·github
uhakadotcom10 小时前
使用Cloudflare Workers打造全栈应用:从静态网站到复杂后端
后端·面试·github
uhakadotcom10 小时前
Cloudflare RealtimeKit:让实时应用开发更简单
后端·面试·github