解决 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 .
相关推荐
sulikey1 小时前
从入门到精通:如何自己编写高质量的 .gitignore(面向工程实践)
git·gitee·编辑器·gitlab·github·gitignore·gitattributes
散峰而望1 小时前
C++数组(一)(算法竞赛)
c语言·开发语言·c++·算法·github
SelectDB3 小时前
压缩率提升 48%,详解 Apache Doris 存储压缩优化之道|Deep Dive
数据库·开源·github
❀͜͡傀儡师4 小时前
docker部署orion-ops一站式运维管理平台
运维·docker·github
逛逛GitHub4 小时前
GitHub 上狂揽 1 万 Star,这个国产 AI 应用开发平台太厉害了
github
z***43845 小时前
SQL server配置ODBC数据源(本地和服务器)
运维·服务器·github
无限进步_7 小时前
C语言动态内存管理:掌握malloc、calloc、realloc和free的实战应用
c语言·开发语言·c++·git·算法·github·visual studio
字节跳动开源7 小时前
AIBrix v0.5.0 正式发布:实现批量API支持、KVCache v1连接器升级,全面提升P/D架构协同效能
开源·github·资讯
用户345848285058 小时前
Java内存模型如何保证有序性?
github
HelloGitHub10 小时前
比 MySQL 轻,比 SQLite 强:终于有人把 AI 数据库做对了
数据库·开源·github