Reputation: 868
I created a git repo locally. When I try to push to github, I get:
Warning: Permanently added the RSA host key for IP address '140.82.112.4' to the list of known hosts.
Enumerating objects: 47, done.
Counting objects: 100% (47/47), done.
Delta compression using up to 8 threads
Compressing objects: 100% (39/39), done.
Writing objects: 100% (47/47), 756.22 KiB | 9.11 MiB/s, done.
Total 47 (delta 7), reused 0 (delta 0), pack-reused 0
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
client_loop: send disconnect: Broken pipe
When I run git remote -v:
origin [email protected]:crwils/react_unit_and_cypresstesting.git (fetch)
origin [email protected]:crwils/react_unit_and_cypresstesting.git (push)
Tried increasing the git buffer size:
git config --global http.postBuffer 157286400
Based on various other, similar issues/solutions found on here, I've also tried:
This just started happening with some existing as well as new repo's, but not others, no theme apparent.
Can anybody help please?
Upvotes: 9
Views: 22402
Reputation: 1
This was happening for me because the remote Github branch I had branched off was deleted and the corresponding pull request had been merged into main
and closed.
Fixed by rebasing on main
& doing another git push
.
Upvotes: 0
Reputation: 21
I've been through the ringer with this one on multiple versions of windows. It only occurs on my laptop, and over wifi. The only solution I found working, after trying every command line solution on stackoverflow is to figure out your exact wireless card model, and downloading the latest drivers for it. Uninstall the device and remove original driver before attempting.
Good luck!
Upvotes: 1
Reputation: 868
The only solution for this was to use HTTPS first, then switch to SSL e.g.
git remote set-url origin [HTTPS: https://github.com/username/your-repo-name]
git remote set-url origin [SSH: [email protected]:username/your-repo-name]
Upvotes: 0
Reputation: 1323573
Check first if using HTTPS instead of SSH would work: that would isolate the issue on SSH port 22.
cd /path/to/react_unit_and_cypresstesting
git remote set-url https://github.com/crwils/react_unit_and_cypresstesting.git
git push
You will have to enter your GitHub username/password, but they can be cached in a credential helper.
Upvotes: 10