Hours and hours on this, I for some reason, absolutely cannot push to github.
I was re-added a few days ago to an organizations group, and re-added my SSH key in github settings...
Key appears to be working by running:
ssh -T [email protected]
I then get:
Hi meatcorpname! You've successfully authenticated, but GitHub does not provide shell access.
But it continually hangs and eventually gives up on writing objects, after a painful large chunk of 5-10 minutes.
Goal: I have a local project I am working on, I am simply just trying to port it on the organization's github. I have created the repo name, and set the origin a dozen or so times, via SSH and HTTPS, all confirmed each time via git remote -v
. I have completely removed and/or re-wrote the remote origin path, trying various ways, multiple times.
The most consistent error, I get is: fatal: the remote end hung up unexpectedly
Total 229 (delta 70), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
But occasionally I have received things like this:
remote: fatal: pack exceeds maximum allowed size (2.00 GiB)
send-pack: unexpected disconnect while reading sideband packet
This is a small website, with a JS, CSS, and modest image folder... Not large by any means for Github. There is also a video folder container 6 .mp4 videos, which I suppose somewhat large.. Anyway, I tried removing the videos from git tracking, then removing the folder entirely, and re-pushing, still hangs and gives up.
Most recently I have tried:
git config --global http.version HTTP/1.1
Nothing.
git config --global http.postBuffer 157286400
Nothing.
using --Force flag with push command(s).
Nothing.
GIT_CURL_VERBOSE=1 git push
Nothing.
Anything left I can try to simply push my local project to a defined, new, github repo?
CodePudding user response:
Transfer the ownership of the repo through Github's tools https://docs.github.com/en/[email protected]/repositories/creating-and-managing-repositories/transferring-a-repository
Or fork the Repo and then delete the link to the fork and done.
To manage big files in Git you need the following extension: https://git-lfs.com/
CodePudding user response:
Perhaps try using Git LFS? https://git-lfs.com/
Here is a guide on how to install it: https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage
And here is how to add files to it: https://docs.github.com/en/repositories/working-with-files/managing-large-files/moving-a-file-in-your-repository-to-git-large-file-storage
CodePudding user response:
Git is not designed for such large packs of data. You got the error message saying that the data that you're trying to push exceeds the maximum allowed size of 2 GiB, which means it could be much larger than that:
remote: fatal: pack exceeds maximum allowed size (2.00 GiB)
You may want to try Git LFS which stands for "large file storage", or to push the larger files one at a time.
CodePudding user response:
For some reason, removing the git folder, and re-intializing git worked. Guessing it needed this with the re-adding to the organization/new set of SSH key in github?
The videos were potentially an issue with size and pertaining to the size error; but again I had removed that folder and still ended up with the same hanging, disconnect. Fml