侧边栏壁纸
博主头像
noerror

虚灵不寐,众理具而万事出。

  • 累计撰写 239 篇文章
  • 累计创建 9 个标签
  • 累计收到 2 条评论
标签搜索

目 录CONTENT

文章目录

fatal detected dubious ownership in repository at解决办法

noerror
2022-09-17 / 0 评论 / 0 点赞 / 704 阅读 / 211 字 / 正在检测是否收录...

fatal detected dubious ownership in repository at解决办法

问题描述

执行git submodule update --init --recursive更新子模块时报错:

fatal: detected dubious ownership in repository at '/media/data/users/jhu3szh/serialize'
To add an exception for this directory, call:

git config --global --add safe.directory /media/data/users/jhu3szh/serialize

解决办法

因为git心的权限安全策略导致的报错,可以按提示把目录添加到信任列表

git config --global --add safe.directory /media/data/users/jhu3szh/serialize

如果仍有其他问题可以考虑把目录下的所有内容都添加到信任列表:

git config --global --add safe.directory "*"

另外如果是linux系统,请检查目录所属的用户、以及访问权限。如果目录所属用户不是当前用户可以使用命令切换:

chown -R <当前用户> <当前目录>
0

评论区