有时候我们git pull的时候出现:
 
remote: Counting objects: 15, done. remote: Compressing objects: 100% (9/9), done. remote: Total 9 (delta 6), 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
 
 
 
我们发现,remote的内容都已经拉下来了,但是git没有权限写入本地的数据库中:.git/objects
 
所以导致pull失败。
 
错误原因已经很清楚了,所以我们只需要将.git/objects的权限改为当前用户可写的就行:
 
sudo chown -R current_user .git/objects 
 
 
 
然后在git pull, okay了。
 
 
 原文:http://blog.csdn.net/hongchangfirst/article/details/60871336
 
 作者:hongchangfirst
 
 hongchangfirst的主页:http://blog.csdn.net/hongchangfirst
 
                
        
    
                    转载请注明原文地址: https://ju.6miu.com/read-2035.html