! [remote rejected] master -> master (unpacker error) 解决办法

今天 push 到自己搭建的 git 服务器时遇到了这个错误。

remote: error: insufficient permission for adding an object to repository database ./objects
remote: fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To git@127.0.0.1:/srv/git-server/checkpoint.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'git@127.0.0.1:/srv/git-server/checkpoint.git' [Read More]

Permission denied (publickey).

A problem occurred while I `git push` to my git server on ec2.

I handled this by following this three guide of which their original links are:

http://stackoverflow.com/questions/13363553/git-error-host-key-verification-failed-when-connecting-to-remote-repository

https://chenhuachao.com/2016/05/26/ssh%E5%87%BA%E9%94%99-sign-and-send-pubkey-signing-failed-agent-refused-operation/

Sorry for missing out the second source link, I will add that later.

Firstly, check your url if it’s right. If it’s outdated, update it with:

git remote set-url origin git://new.url.here [Read More]