解决 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 .
相关推荐
在逃花果山的小松9 小时前
ChatClient中间件LoggingChatClient——在调用LLM前后输出
github
摆烂菜鸡沧9969 小时前
【自用整理】本地关联GitHub多账号设置
git·github
yuanyuan2o210 小时前
Transformers NLP 任务:阅读理解问答
人工智能·算法·自然语言处理·nlp·github
nebula-AI10 小时前
Understand Anything 简要使用文档
人工智能·ai·github·项目管理·知识图谱·dashboard
MicrosoftReactor10 小时前
技术速递|使用 GitHub Copilot CLI 构建 Emoji 列表生成器
ai·github·copilot·cli
带娃的IT创业者11 小时前
1-Click GitHub Token Stealing:深入解析 VSCode 中的惊险漏洞
ide·vscode·github·安全漏洞·github token·1-click
lauo11 小时前
ibbot手机:一部手机,双重革命
人工智能·智能手机·架构·开源·github
JavaGuide1 天前
Claude Code 怎么学?推荐 4 个高质量开源教程,从入门到实战
github·ai编程·claude
我命由我123451 天前
Android 开发问题:Could not find com.github.PicnicSupermarket:FingerPaintView:1.2.
android·github·android studio·安卓·android jetpack·android-studio·android runtime
行走__Wz1 天前
本地项目初次上传到GitHub教程
github