3

Trying to clone a bare repository and get the following error message. The repository is rather big with 3GB total size. Client I want to clone to is MacOSX.

remote: Counting objects: 20118, done.
remote: Compressing objects: 100% (16577/16577), done.
error: pack-objects died of signal 9 3.49 MiB | 745 KiB/s     
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

I had this problem in the beginning, too and fixed it with

git config pack.windowMemory 5m
git config pack.packSizeLimit 10m

like mentioned in this post

git repack works on the remote host, no errors. git gc is not working though, ends with following error message.

Counting objects: 20118, done.
Delta compression using up to 2 threads.
error: failed to run repack6551/16577) 

What can I do?

Community
  • 1
  • 1
Mr Magix
  • 31
  • 1
  • 2

1 Answers1

5

I had the same problem. Setting the following parameters:

[core]  
  packedGitLimit = 10m  
  packedGitWindowSize = 10m  

[pack]  
  deltaCacheSize = 10m  
  packSizeLimit = 10m  
  windowMemory = 10m  

then repack:

> git repack

AND finally running git gc WITH the --aggressive parameter:

> git gc --aggressive

It solved the problem for me. It did not work for me without the --aggressive parameter. Please note that I have control over the server and that I runned those commands in the repo on the server (on a Gitlab server instance on a Debian machine, as root, with sudo -u git ..., to avoid messing file ownership and permissions). The method may not be suitable if you do not have access to the remote repo. My version of git is 1.8.3.

Laurent_Psy
  • 101
  • 2
  • 2