While cloning git repo from cmdprompt "The remote end hung up unexpectedly"

Hi,

Getting this below error while trying to clone git repository in gitlab which is installed in red hat linux.
Please provide some suggestion to resolve this issue.
client :trying to clone from windows command prompt

GITLAB version : 8.0.2

D:\git_practice>git clone http://machine:8081/root/FMB_System_Repo.git
Cloning into ‘FMB_System_Repo’…
Username for ‘http://machine:8081’: root
Password for ‘http://root@machine:8081’:
remote: Counting objects: 41335, done.
rror: RPC failed; result=18, HTTP code = 200) e
remote: Compressing objects: 100% (8911/8911), done.
fatal: The remote end hung up unexpectedly
fatal: protocol error: bad pack header

Regards
Suresh G

I know you asked this question a while ago, so you may or may not still have this issue.

One of the common reasons this can happen is if your server runs out of RAM while packing the repository. You can try limiting the amount of RAM used by Git to see if that fixes the problem.

As the git user, run the following commands:

git config --global pack.windowMemory 100m
git config --global pack.packSizeLimit 100m
git config --global pack.threads 1

Adjust the numbers for your particular server’s RAM.

@kohenkatz - thanks for this. Is there some logfile that will show an error if this happens?

Alternatively is there some way to trim down a repo size to make cloning easier?

Check the main system log (on Ubuntu it’s /var/log/syslog) for out-of-memory messages.

Thanks!

Also - in reply to my own previous question, you can do shallow clones: https://docs.gitlab.com/ee/ci/yaml/#shallow-cloning

Git has “garbage collection”, which GitLab runs automatically or when you go into the repository settings and run it manually. However, there’s only so much you can save, since a repository with stuff in it has to take up space.