牛骨文教育服务平台(让学习变的简单)
博文笔记

三分钟教你学Git(二十四) error: insufficient permission

创建时间:2017-04-18 投稿人: 浏览次数:1637

有时候我们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


声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。