Reputation:
Uploading LFS objects: 100% (1201/1201), 2.6 GB | 9.1 MB/s, done.
Enumerating objects: 20004, done.
Counting objects: 100% (20004/20004), done.
Delta compression using up to 12 threads
Compressing objects: 100% (11626/11626), done.
remote: fatal: pack exceeds maximum allowed size /s
error: RPC failed; curl 55 Send failure: Connection was aborted
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (20004/20004), 4.78 GiB | 23.39 MiB/s, done.
Total 20004 (delta 11193), reused 17185 (delta 8374), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date
I can't seem to publish my files to the remote repository. I have LFS enabled. How can I fix this??
Upvotes: 1
Views: 957
Reputation:
Ok, so having found out that the error message was due to trying to push files that exceeded 2GB, I solved it by manually adding files incrementally.
How I did it:
On Git Bash
git init
git remote add origin (link)
git lfs install
git pull origin master
.gitattributes
Then go to Github Desktop
(For some reason, adding, committing, and pushing LFS doesn't work in Git Bash. But simply initializing LFS in Github Desktop, without having done git lfs install
in Git Bash, also doesn't work either.)
Has to be in this particular order for some reason.
Upvotes: 0
Reputation: 76964
The problem you're seeing here has nothing to do with Git LFS. The problem is that the Git pack you're pushing to the remote is larger than 2 GB, which is the maximum limit that GitHub has to avoid denial-of-service problems and situations where people exceed maximum repository size limits.
You'd need to push your commits incrementally so that you end up with several smaller pushes. For example, if your branch is main
, you could push 1000 commits at a time with this approach.
$ git rev-list --reverse main | \
perl -ne 'print unless $i++ % 1000;' | \
xargs -I{} git push origin {}:main
If you don't care for Perl. Ruby can do something similar.
You should then follow it up with the regular push you intended to do in the first place.
Upvotes: 1