How to fix this error: RPC failed; curl 56 Recv failure: Connection was reset

9.8k Views Asked by At

I ran the following command, but this message has displayed. How can I fix it?

E:\Workspace\Blockchain>git clone https://github.com/substrate-developer-hub/substrate-node-template
Cloning into 'substrate-node-template'...
remote: Enumerating objects: 2185, done.
remote: Counting objects: 100% (91/91), done.
remote: Compressing objects: 100% (54/54), done.
error: RPC failed; curl 56 Recv failure: Connection was reset
error: 2269 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

I don't know how to fix it.

Please, help me. Thanks.

2

There are 2 best solutions below

2
mohas On

Setting the git buffer size to hundreds of terabytes did not solve this for me, the problem is that server or your connection does not allow reliable download of data, in my case increasing the request size and timeout limit on my server (IIS) solved the problem.

One sign to watch for is that at first it might fail at 7% for example, as you increase the request size or timeout it will now fail at 33%, just increase the limits further to fix the problem

1
chakresh singh On
  • Set http.version to HTTP/1.1 and then perform git push.

  • Revert back to HTTP/2 later.

    git config --global http.version HTTP/1.1

    git config --global http.version HTTP/2