首页 > 建站教程 > 其他 >  TortoiseGit报错:Could not get HEAD hash. libgit2 returned: repository path '*' is not owned bu current正文

TortoiseGit报错:Could not get HEAD hash. libgit2 returned: repository path '*' is not owned bu current

TortoiseGit小乌龟git报错

Could not get HEAD hash. libgit2 returned: repository path ‘***’ is not owned bu current user.


原因

因为当前项目所在目录之前是别的用户组拥有的,现在不是当前用户所拥有,所以小乌龟认为他不安全。拒绝解析。


解决

Win + R ,输入如下指令:

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


告诉它全局都是安全的即可。