git clone issue: repo too large? (50m)
Been having an issue with being unable to clone a git repo. It starts to run and then cancels half way through.
My current git repo size is 53.7 MB
Git version is 220.127.116.11 on server and on my remote.
MacBook-Pro:htdocs macbook$ git clone firstname.lastname@example.org:~/opt/git/myrepo.git Cloning into 'myrepo'... email@example.com's password: remote: Counting objects: 8888, done. remote: Compressing objects: 100% (7185/7185), done. Write failed: Broken pipe267/8888), 1.03 MiB | 1001.00 KiB/s fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed
I created a fresh new repo, clones just fine. Once I add my site files to it and push them to the remote though. I can no longer clone from it. But I can pull from it just fine.
I added this with no luck:
[core] compression = -1 [pack] windowMemory = 10m packSizeLimit = 20m
I tried upping these both to way higher values. No luck
I also tried running
git gc --aggressive and git
gc --prune on the remote repo.
I’ve seen this post, but mine is no where as large (1g+)
Also see a people having issues with the git versions not matching, but this isn’t the case ether.
2 Solutions collect form web for “git clone issue: repo too large? (50m)”
I think the problem you are having is your clone breaks off in the middle every time.
So, instead of cloning a repo again and again from scratch everytime, I would suggest you instead do a fetch on a freshly created repo.
Basically, initialize an empty repository
cd repo_name && git init
Add the original repo as a remote in this repo
git remote add origin url/to/repo
And now do a
This way, even if your clone breaks in the middle,
fetch will take care to bring in unfetched objects only in next run.
Alternatively, you can check the solutions here and here.
Also try increasing your postBuffer
git config --global http.postBuffer 1048576000