Search code examples
gitgithubpush

Github issue. fatal: the remote end hung up unexpectedly


I faced this issue too many times, it occurs while pushing commits to Github. As I searched for, it looks to be caused by slow internet connection, is it true? can I push it without having fast uplink connection?

There is some logs that I collected from.

brief error log:

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

Full error log keypoint:

Info: TLSv1.3 (IN), TLS alert, close notify (256):

Full error log is HERE

Here is a list of what I do to solve this issue without changing anything

  • git config --global http.postBuffer 524288000
  • git config --global http.lowSpeedLimit 0
  • git config --global http.lowSpeedTime 999999
  • set GIT_HTTP_MAX_REQUEST_BUFFER=100M

Screenshot: enter image description here


Thank a lots 💙


Solution

  • Here is the answer

    Here we go, I got my answer after trying too many ways in three days, for whoever will face this issue, do this stuff (read all below before starting):

    • At first, Open Git Bash
    • then, follow this instructions to generate SSH code and attach it to Github account.
    • Go to Github repository page
    • Click on Code button
    • Change it to SSH
    • Copy SSH CODE and use below, I determine your SSH code is [email protected]:user/user-repo.git
    • In your terminal write git remote add origin-ssh [email protected]:user/user-repo.git, SSH CODE is which you copied one step before
    • And finally push by git push -u origin-ssh
    • Congrats 🎉

    Notes:

    • Don't add passphrase while generating SSH code if you are new to SSH, just trigger Enter button.
    • Remember, [email protected]:user/user-repo.git is not your real SSH code, I use it as an example, use which Github gives you, it's an unique code.