关于 git unsafe repository 的错误应该如何一劳永逸的解决的?

搁浅 2023-06-07 09:57:13 887

错误信息如下

➜  crawler-srv git pull
fatal: detected dubious ownership in repository at '/www/wwwroot/crawler-srv'
To add an exception for this directory, call:

        git config --global --add safe.directory /www/wwwroot/crawler-srv

解决办法如下

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

解决后,GIT就正常了,如下

➜  crawler-srv git config --global --add safe.directory '*'
➜  crawler-srv git:(master) 
➜  crawler-srv git:(master) git pull
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 4), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), 410 bytes | 410.00 KiB/s, done.
From gitee.com:ieras/crawler-srv
   e158904..ac19fe2  master     -> origin/master
Updating e158904..ac19fe2
Fast-forward
 app/Services/ArticleService.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
这家伙太懒了,什么也没留下。

社区声明 1、本站提供的一切软件、教程和内容信息仅限用于学习和研究目的
2、本站资源为用户分享,如有侵权请邮件与我们联系处理敬请谅解!
3、本站信息来自网络,版权争议与本站无关。您必须在下载后的24小时之内,从您的电脑或手机中彻底删除上述内容
最新回复 (0)

您可以在 登录 or 注册 后,对此帖发表评论!

返回