Git报错insufficient permission for adding an object to reposi ,error: insufficient permission for adding an object to repository database .git/objects。
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
$git pull
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 24 (delta 14), reused 3 (delta 1)
error: insufficient permission for adding an object to repository database .git/objects
首先,得是Root:
#id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
然后:到那个出现 错的项目目录下面,它下面有一个.git这是肯定的,
1)对这个.git目录权限给斧正:
chmod 755 .git
chown -R xiangdong.irdcops .git
2)给它下面的文件和文件夹的权限斧正:
cd .git
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
参考:http://blog.sina.com.cn/s/blog_87b9bbc70102uyo3.html
fatal: failed to write object
fatal: unpack-objects failed
$git pull
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 24 (delta 14), reused 3 (delta 1)
error: insufficient permission for adding an object to repository database .git/objects
首先,得是Root:
#id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
然后:到那个出现 错的项目目录下面,它下面有一个.git这是肯定的,
1)对这个.git目录权限给斧正:
chmod 755 .git
chown -R xiangdong.irdcops .git
2)给它下面的文件和文件夹的权限斧正:
cd .git
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
参考:http://blog.sina.com.cn/s/blog_87b9bbc70102uyo3.html
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/9292/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表