Skip to content

Instantly share code, notes, and snippets.

@daopk
Last active May 2, 2024 01:38
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • 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
@mskashef
Copy link

mskashef commented May 29, 2022

I'm using WSL2 and this solutions does not work for me.
(I don't commit large files and the changes are few lines of code)

Compressing objects: 100% (44/44), done.
Writing objects: 100% (44/44), 4.98 KiB | 1.24 MiB/s, done.
Total 44 (delta 36), reused 0 (delta 0)
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

I also have tried this:

git config --global http.version HTTP/1.1

@AtiqurCode
Copy link

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

Thanks great solutionn

@MBilal199
Copy link

It didn't worked :( for me as well

@PrimeTime416
Copy link

I had the same issue, it turns out it was my VPN :( I had to stop the VPN then sync with git in CLI and vsCode then it worked :) After that I turned on my VPN and made a small change in one of the files to test the git push/pull/sync and everything worked! Thanks all for your insight in troubleshooting this problem.

@anuj9939
Copy link

change the network work for me.
I was try to change global property but it was not work.

@Ayesiza
Copy link

Ayesiza commented Aug 23, 2022

Permission denied that what i get

@dianajoan
Copy link

git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400

this worked for me

@jerrywebman
Copy link

where do i have to copy this?

this worked for me

git config --global http.postBuffer 157286400

@olasesi
Copy link

olasesi commented Sep 11, 2022

I am in this. No solution has worked for me.

@mdmarufsarker
Copy link

No solution has worked for me
image

@turgenevivan
Copy link

option1: https://stackoverflow.com/a/68408157
option2: https://stackoverflow.com/a/63172641

I prefer to use git instead of https

@ashu123git
Copy link

WTF! It worked while changing the operator. And I wasted so much time figuring out where am I going wrong..... Weird...

@ashu123git
Copy link

I was having the same problem.

image

I don't know if it will be the problem, I changed my internet service provider, and it worked for me :)

image

any idea?

It worked for me too just by changing the operator. Weird.

@ashu123git
Copy link

@best-lucky1030 It is weird, I know but yes, It worked when I switched my network just before hitting Enter.

@parth7802
Copy link

parth7802 commented Jan 23, 2023

error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
Not working for me

did you solve this error?

I also have the same error and have not been solved yet, do you have any solution?

Just i tried use my mobile network to upload the project sweat_smile

Had the same error error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
Suprisingly, it worked for me when I tried using my mobile network via hotspot to my pc. Unexpectdly it solved the problem

Worked for me too when switching to mobile network. No doubt just needed a different connection, not a mobile specific thing. A weird one though...

Change of network worked for me .. thanks buddy

how to change the network i mean you are talking about wifi
i have chaange network several time but not working same problem

@Can-Bin
Copy link

Can-Bin commented Feb 20, 2023

it is enough to change the network. It worked for me too

@Rajaekh
Copy link

Rajaekh commented Mar 5, 2023

Me too I have the same problem

@spartus434
Copy link

"git config --global http.postBuffer 157286400" worked for me. Thank You.

@chandangupta1997
Copy link

Change of network worked for me ..

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

@nahuel
Copy link

nahuel commented Dec 31, 2023

Try using:

git config --global url."git@github.com:".insteadOf "https://github.com/"   

@ashivaakrishna
Copy link

try the below
git config --global http.postBuffer 524288000

@ElizaHaHaHa
Copy link

help

@EmekaManuel
Copy link

I used "git config --global http.postBuffer 157286400". Tried using 524288000 but it didn't work. I use an M1 pro just to be specific.

@SoroMoise
Copy link

git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400

the error occurred when I wanted to convert my kivy project into an apk

this worked for mi

@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@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

@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?

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