美文网首页
git 问题 --- fatal: detected dubio

git 问题 --- fatal: detected dubio

作者: Fizz_YF | 来源:发表于2024-09-08 16:28 被阅读0次

在通过 Git Bash 提交项目代码时输入 git status 命令后,报错:fatal: detected dubious ownership in repository at

这是因为该项目的所有者与现在的用户不一致

比如说: 该项目的所有者是 root,而当前用户是 www, 那么就会导致上面的错误

解决的办法也很简单在 git bash 中输入:

# 命令 git config --global --add safe.directory "你的目录或者文件" ;意思就是把该目录或者文件白名单安全的
git config --global --add safe.directory "*"

相关文章

网友评论

      本文标题:git 问题 --- fatal: detected dubio

      本文链接:https://www.haomeiwen.com/subject/ryceljtx.html