Git, error: remote unpack failed: unable to create temporary object directory - By creating new Branch

Störungs Sucher picture Störungs Sucher · Jul 24, 2018 · Viewed 52.8k times · Source

I'm trying to create a new branch in my repo.

I did this:

git branch events
git Checkout events

That worked. So I changed some files and did:

git Status
git add --all
git commit -m "Commit"

That worked well but I tried to push it and that didn't work:

git push -u origin events

This is the error:

Enumerating objects: 9, done.                                                                                                                       
Counting objects: 100% (9/9), done.                                                                                                                 
Delta compression using up to 4 threads.                                                                                                            
Compressing objects: 100% (5/5), done.                                                                                                              
Writing objects: 100% (5/5), 716 bytes | 716.00 KiB/s, done.                                                                                        
Total 5 (delta 4), reused 0 (delta 0)                                                                                                               
error: remote unpack failed: unable to create temporary object directory                                                                            
To http://git.int.censoredlink/scm/freeb/freebrep.git                                                                                       
 ! [remote rejected] events -> events (unpacker error)                                                                                              
error: failed to push some refs to 'http://[email protected]/scm/freeb/freebrep.git'

I don't know why it does not work.

I have Admin rights on the Repo. I censored the link to the repo because its an internal Repo with private link.

Answer

torek picture torek · Jul 24, 2018

This error message:

error: remote unpack failed: unable to create temporary object directory

indicates that the Git repository at the server (not your Git) is out of space, or running into similar server problems,1 or installed incorrectly. That is, given:

To: http://git.int.censoredlink/scm/freeb/freebrep.git

you will have to log in to the machine that serves HTTP traffic at git.int.censoredlink, walk down to the scm/freeb/freebrep.git directory, and correct the installation there. It's most likely a permissions issue: the receiving Git must be able to create, in the objects area, a directory named incoming-XXXXXX with the Xs replaced by a unique identifier, and then create within that directory a pack subdirectory.

All incoming objects and pack files are placed in these directories, in a sort of quarantine procedure, until the server-side Git hooks are satisfied with the reference name update requests. If the push fails, the quarantine directory is simply removed. If the push succeeds, the quarantined objects and/or pack files are migrated (and thin packs adjusted) into the normal object storage area. Note that the migration can fail even if the quarantine process succeeds; but if it does so, you get a different error reported to the client. (This error must also be corrected on the server.)

Note: it's rather unusual to push to http:// rather than https:// or ssh:// URLs. Inspect your server configuration to see who will own the various files thus created, and what permissions the web server will have.


1If a hard drive fails, Linux will sometimes mark the drive and/or its file systems read only. Or, even if you have disk space, you can run out of inodes. A number of different root causes will all lead to the same observed behavior on your client end. If you are a Linux admin checking on a server, look for system log messages, and consider both df and df -i output.