Search code examples
gitgitlabgit-pushgit-repo

Git Error: remote unpack failed: unable to create temporary object directory - While attempting to push to remote repository


While attempting to push to a remote repository I am receiving the following error

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 40 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 368 bytes | 368.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
error: remote unpack failed: unable to create temporary object directory
To gitlab:product-line-family/testRepo.git
 ! [remote rejected] devel -> devel (unpacker error)
error: failed to push some refs to 'git@gitlab:product-line-family/testRepo.git'

I have looked through answers to this similar question however it does not seem to be a permissions or storage issue as is suggested in the other answers. The error is persistent across multiple users and workstations and each has full permissions to the local repository.

If anyone has any ideas what may be causing this and how to fix it I would greatly appreciate the advice!


Solution

  • Somewhat same problem. Solved it (for me). A tricky one.

    My client is a MacOS. I have it running under user 'president'.
    My git-server runs on a Synology NAS. There I am majorly running everything also under a user called 'president'. In fact these are not the same users since they exist on different physical setups.
    And by the way I setup the git-server with a user named 'gituser'. Since the 'president' is a very mighty user there is no problem to access everything with 'president' which can be accessed by 'gituser'.

    And now, since I am remotely accessing with a local user with the same name that the server somewhat knows this is why I worked.

    In other words this worked after password is asked and entered:

    CLIENT/president> git clone ssh://myserver:22/git/myrepo
    

    The login happens with (the wrong) 'president' and (some) git functionality will work flawless.
    The better way is using the proper git-user 'gituser' which is allocated on the server:

    CLIENT/president> git clone ssh://gituser@myserver:22/git/myrepo
    

    That does the trick for me. So no corrections need to be done on the server side.

    Further reading on setting up git on a Synology: https://gist.github.com/walkerjeffd/374750c366605cd5123d