突然报错,我好慌:
问题描述: 执行git pull,返回这坨:
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 3), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
网上找了很多办法,亲测有用:
步骤一:进入项目根目录
cd /path/to/repo.git
sudo chgrp -R groupname .
sudo chmod -R g+rwX .
步骤二:再次执行 git pull,出现以下这坨:
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
error: object file .git/objects/2b/4653bd306413ba6f70b65fc672ce897653da00 is empt