remote: error: insufficient permission for adding an object to repository database ./objects

标记一下git push这个坑,本地使用git 上命令传报错:

(blogenv) F:\Python\blog>git push origin master:b2
git@******'s password:
Enumerating objects: 23, done.
Counting objects: 100% (23/23), done.
Delta compression using up to 8 threads
Compressing objects: 100% (20/20), done.
Writing objects: 100% (20/20), 1.55 KiB | 396.00 KiB/s, done.
Total 20 (delta 15), reused 0 (delta 0)
remote: error: insufficient permission for adding an object to repository database ./objects
remote: fatal: failed to write object
error: remote unpack failed: unpack-objects abnormal exit
To :/wwwroot/blog
! [remote rejected] master -> b2 (unpacker error)
error: failed to push some refs to 'git@
:/wwwroot/blog

pycharm 用 vcs>git>push 报错:

Push rejected: Push master to origin/b2 was rejected by remote
或者
Push rejected: Push master to origin/master was rejected by remote

百度这个报错容易跑偏,试了很多无解。 最后知道 是服务器git项目权限问题,于是就奔着项目去了

在这里插入图片描述

去存放项目的目录 我的是 /wwwroot /blog chown -R git:git /wwwroot /blog/.git 回车完事后,再去重新push即可,命令还是vcs就都可以了。

remote: error: insufficient permission for adding an object to repository database ./objects_第1张图片

你可能感兴趣的:(实际问题解决)