Skip to content

Instantly share code, notes, and snippets.

@daopk
Last active February 22, 2025 09:40
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
@Tasbeehkhan
Copy link

What's the problem actually

@Mahdi-Magroun
Copy link

Mahdi-Magroun commented Mar 4, 2024

git config --global http.postBuffer 157286400
execute the command above and if it still the same issue just restart your machine and it will work .

@MANOJ1245723
Copy link

I fixed my same problem by changing my network(connected to my mobile data got it installed with in 10secs which i spend figuring out for 2 days)

@TinchoBus
Copy link

Buenas tardes necesito solucionar este problema con mi github cuando quiero subirlo a un repositorio me tira el error
error: RPC failed; HTTP 400 curl 92 HTTP/2 stream 7 was not closed cleanly: CANCEL (err 8)
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (43/43), 3.11 MiB | 210.00 KiB/s, done.
Total 43 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
fatal: the remote end hung up unexpectedly
Everything up-to-date
Si alguien puede brindarme una solucion desde ya muchisimas gracias

@cwm9cwm9
Copy link

On WSL, switch to SSH.

First create ssh keys:
cd ~/.ssh
ssh-keygen -o -t rsa -C "[email protected]"
(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."[email protected]:".insteadOf "https://github.com/"

Everything should work now

@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 protected]" (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."[email protected]:".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.

@Hitek55
Copy link

Hitek55 commented Aug 12, 2024

git config --global http.postBuffer 524288000

error: RPC failed; curl 18 transfer closed with outstanding read data remaining

Thanks! This solved my problem.

@jeromechungmf
Copy link

In my case, the error was caused by a previous improper shutdown, which led to the network card data not being cleared. The command sudo ifconfig eth0 down is used to bring down the network interface, where eth0 is the name of the network interface. In Linux, you can use the command ip a to obtain the name of your network interface.

@gurselturkeri
Copy link

git config --global http.postBuffer 157286400 worked for me. Thanks!

@SmileMachine
Copy link

Change of network worked for me ..

yeah i switched to mobile newtork and it worked for me as well

Same, after trying so many solution, using a hotspot solved this problem. (My phone is connected to the same wifi)

@atomlab
Copy link

atomlab commented Oct 31, 2024

Worked for me.

@GermanAizek
Copy link

git config --global http.postBuffer 157286400 worked for me. Thanks!

Many thanks, its worked for me.

@kyilwinhan
Copy link

kyilwinhan commented Dec 15, 2024

Screenshot from 2024-12-15 22-06-17

I followed the instruction, but the download speed is too slow.
So I canceled it and switch back to HTTP/2 using
git config --global http.version HTTP/2
and it worked.
Hope this also work for others. Thank you.

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