By alexmoreno, 8 February, 2013

I have had this issue recently, with a git branch which did not want to to react to push. That's what a was having:

  1. $ git pushgit@domain.net's password Counting objects: 5, done.
  2. Delta compression using up to 2 threads.
  3. ng objects: 100% (3/3), done.
  4. Writing objects: 100% (3/3), 303 bytes, done.
  5. Total 3 (delta 2), reused 0 (delta 0)
  6. error: unable to create temporary sha1 filename ./objects/17: Permission denied
  7. fatal: failed to write object</p><p>error: unpack failed: unpacker exited with error code
  8. git@domain.net:/var/www/git/domain
  9. ! [remote rejected] HEAD -> master (n/a (unpacker error))
  10. error: failed to push some refs to 'git@server:/var/www/git/domain'

The problem is a permissions one... but it will not work if you try to update the permissions in the server folder. You have to update the permissions in the server, but in .git folder:

chown -R git:git .git/

In my case git was the user who should have the permissions to write.

Once changed, the push in your local environment should work.

categorias