Death-is-the-real-truth
Death-is-the-real-truth

Reputation: 72269

Git clone/push issue: error: RPC failed; curl 16 Error in the HTTP2 framing layerB/s

I am getting this issue frequently while cloning from Git to local or pushing from local to Git:

error: RPC failed; curl 16 Error in the HTTP2 framing layerB/s

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

I tried multiple solutions given over SO/Google, but none of them worked. Here is what I have tried:

a) Run the below command:

git config --global http.postBuffer 1048576000

git config --global http.lowSpeedLimit 0

git config --global http.lowSpeedTime 999999

b) Run the below command:

set GIT_TRACE_PACKET=1

set GIT_TRACE=1

set GIT_CURL_VERBOSE=1

c) Run the below command:

git config --global http.version HTTP/1.1

But none of them worked. How to resolve it?

Note: I can not use these commands (given as a solution in some answers) as I want full fledge/full-depth clone project:

git config --global core.compression 0
git clone --depth=1 <url>
cd <shallow cloned project dir>

I am also not using any proxies/browser extensions/firewall/antivirous/as well as my network connection is pretty good/stable.

Upvotes: 0

Views: 1894

Answers (1)

Death-is-the-real-truth
Death-is-the-real-truth

Reputation: 72269

Finally, I found a pretty simple solution using the SSH command for cloning. The step-by-step process is described below:

To fix this issue you need to use the SSH command given on GitHub, for example:

a) git clone [email protected]:demoUser138/Yo-B.git

b) But this requires adding a public key. click on the link given in the repo SSH section: add a new public key

enter image description here

c) Now for windows user open : C:/Users/<your system User for example Death is real truth>/.ssh

d) Now copy the code of id_rsa.pub (public SSH key file data) to the key section.(Refer below image)

enter image description here

e) Now click on the add SSH key button, it will ask password of your GitHub account, add it and it will get added successfully.

f) Now the first command will work flawlessly.

Note:

This will work for pull/push/commit as well.

You have to add your system's public SSH key file data. (You can easily search the path of the file over Google for Linux or other OS etc)

Make sure that you have a good stable internet connection as well because multiple users faced it due to poor internet connection issue. In that case the above solution will may not work.

Upvotes: 0

Related Questions