23

git clone is aborting due to possible repository corruption on the remote side even though memory settings are done properly

I would able to fetch and push my codes to same repo. when I try to clone in another machine it says error.

Here is .gitconfig settings

[pack]
    windowMemory = 1000m
    SizeLimit = 1000m
    threads = 1
    window = 0

Error:

   Cloning into 'auto_shop'...
    stdin: is not a tty
    remote: Counting objects: 3043, done.
    remote: Compressing objects: 100% (2872/2872), done.
    error: pack-objects died of signal 94.62 MiB | 89.00 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.
    fratal: early EOF:  31% (966/3043), 5.68 MiB | 223.00 KiB/s
    emote: aborting due to possible repository corruption on the remote side.
    fatal: index-pack failed

Also, git fsck does not give any errors.

# git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (2218/2218), done.
dangling commit 7ae478bea3aa6c42cc8fe865c9fc26b35ea9e15d
dangling commit a657b57b65f63f4ffea1c25c77ff62c94471d41a
dangling commit 3c9ef0ff7818812f506fa1d18ef4af4a90a4938d

Please help me how to fix this issue ?

2
  • Uhhh, have you considered there's a possible corruption on the remote side? Mar 2, 2015 at 13:23
  • 1
    I would able to fetch and push my codes to same repo. when i try to clone in another machine it says error.
    – logan
    Mar 2, 2015 at 13:33

2 Answers 2

39

It worked , I set the same config in remote side as well. it worked now..

git config --global pack.windowMemory "100m"
git config --global pack.SizeLimit "100m" 
git config --global pack.threads "1"
git config --global pack.window "0"
2
  • In the event this answer does not work, is there anything else one could try?
    – Alexander
    Apr 12, 2019 at 12:17
  • This answer didn't solve my problem.
    – ramwin
    Feb 7, 2022 at 2:35
17

I met the same problem. After trying all solutions, it still exists. After compare the config to another repository, I found this config works:

git config core.bigfilethreshold 200K

I think it is because there is a large sql backup file backup.sql(size: 305M), git tryied to analysis it as a text file and see the difference.
After using git config core.bigfilethreshold 200K git will not store it deflated nor trying to compress it.

So if configurations like pack.windowMemory, pack.SizeLimit didn't work for you, try using
git config core.bigfilethreshold 200K.

1
  • 2
    Just to clarify this a little more: the setting needs to be applied to the remote repository itself – means server-side. May 30, 2022 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.