Git Error: fatal: the remote end hung up unexpectedly

  • Tue 12 October 2010

  • I installed git on Ubuntu 10.04 at home in an attempt to have a local repository for my powershell code. It worked upon installation, but I attempted to commit and push some updates and it appeared I had lost permissions some how (likely after the last round of patching).

    GitGUI would puke:

        fatal: failed to write objectPushing to
    git@arti:/home/git/repositories/powershell.giterror: unpack failed: unpack-objects abnormal exitTo
    git@arti:/home/git/repositories/powershell.git ! [remote rejected]
    master -> master (n/a (unpacker error))error: failed to push some refs to 'git@arti:/home/git/repositories/powershell.git'
    

    GITBash would give me:

    fatal: the remote end hung up unexpectedly
    

    On my Ubuntu server I could

    ls -lah
    /home/git/repositories/powershell.git/objects
    

    and see that ROOT had permissions on some of the files.

    A simple

    chown -R git:git objects
    

    gave the user:group permissions back...And I was able to push! Success!

    Comments !

    social