在ubuntu使用git的时候遇到了以下错误:
fatal: detected dubious ownership in repository at '/home/xxx'
To add an exception for this directory, call:
git config --global --add safe.directory /home/xxx
谷歌在一篇博客中得到解决方法:
chown -R root /home/xxx
PS: 可以用who
, users
查看当前登录用户,用grep bash /etc/passwd
查看所有用户。
git config --global --add safe.directory '*'
本人用方法1已解决问题,方法2具体细节请参考上文提到的博客。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)