Skip to content

Instantly share code, notes, and snippets.

@daopk
Last active May 27, 2024 22:38
Show Gist options
  • Save daopk/0a95772d582cafb202142ff7871da2fc to your computer and use it in GitHub Desktop.
Save daopk/0a95772d582cafb202142ff7871da2fc to your computer and use it in GitHub Desktop.
Fix error : RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400
@stenwire
Copy link

stenwire commented May 2, 2024

On WSL, switch to SSH.

First create ssh keys: cd ~/.ssh ssh-keygen -o -t rsa -C "email@example.com" (email address doesn't actually matter, you can put whatevers)

Then print the relevant info: cat id_rsa.pub

Copy paste this into Github->Upper right menu->Settings SSH and GPG keys -> New SSH Key -> title = anything, keytype = authorization, paste the key into the box

You will then have to verify your idenitiy.

Then tell git to use SSH: git config --global url."git@github.com:".insteadOf "https://github.com/"

Everything should work now

@cwm9cwm9 didn't work, how to undo it?

@Khadem1
Copy link

Khadem1 commented May 8, 2024

worked for me with this commands and then changing directory to another.
git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400

@SomyaVashisth96
Copy link

You can try increasing post buffer size using git config --global http.postBuffer 157286400

Thanks great solutionn

Thanks a lot for the solution ...it worked for me

@dphilson
Copy link

git config --global http.postBuffer 524288000

Thank you so much! This was exactly what I needed. Well done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment