! [remote rejected] … (n/a (unpacker error))

In case anyone else is stuck with this: it just means the write permissions are wrong in the repo that you’re pushing to. Go and `chmod -R` it so that the user you’re accessing the git server with has write access.

$ git push vps
Counting objects: 47, done.
Compressing objects: 100% (34/34), done.
Writing objects: 100% (34/34), 5.72 KiB, done.
Total 34 (delta 24), reused 0 (delta 0)
error: unable to write sha1 filename ./objects/74/f54987f7c49320a3c487822d291
19a6477c: Permission denied
fatal: failed to write object
error: unpack failed: unpacker exited with error code
To ssh://git@shamess.info:/home/git/todoapp.git
! [remote rejected] groups -> groups (n/a (unpacker error))
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'ssh://git@shamess.info:/home/git/todoapp.git'

7 thoughts on “! [remote rejected] … (n/a (unpacker error))”

  1. I had a similar problem, so I ssh-ed to the server and found that there was some strange problem with the filesystem. Any call to “ls -l” would give me “Bus error” message and nothing else.

    I didn’t feel like to investigate too much so I did what my Pavlov reflex told me: reboot. And to my surprise, everything got back to normal.

  2. Thank you! This was not quite my problem but doing `chown` to the correct user on the files fixed it for me. Thanks for leading me down the right track.

  3. I suffer a lot of days for belowing error but there is no permanent solutions for that so tell me for exact solutions for that error should be displayed.

    error: insufficient permission for adding an object to repository database ./obj
    error: unpack failed: unpack-objects abnormal exit

Leave a Reply

Your email address will not be published.