当前位置:   article > 正文

解决fatal: detected dubious ownership in repository_detected dubious ownership in repository at ' but

detected dubious ownership in repository at ' but the current user is:

git错误提示:fatal: detected dubious ownership in repository

                fatal: detected dubious ownership in repository at 'D:/Git'
                'D:/Git' is owned by:
                BUILTIN/Administrators (S-1-5-32-544)
                but the current user is:
                COOLL/Lenovo (S-1-5-21-332913961-1909816967-542526052-1001)
                To add an exception for this directory, call:

                git config --global --add safe.directory D:/Git

大概翻译过来就是 致命错误:检测到仓库中存在可疑的所有权问题”(其实就是权限问题)

解决方案:

选择git仓库的文件夹右键属性——安全——高级

所有者和当前Windows登录账号不一样——更改——高级

选择立即查找——找到当前帐号——确定

勾选选项——确定

子文件夹一起更改

更改后的效果

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/738054
推荐阅读
相关标签
  

闽ICP备14008679号