Cannot clone Git repository from remote due to a "curl 56 failure"?

Viewed 5037

I am unable to clone a repository:

git clone https://github.com/OSVVM/OSVVM

Cloning into 'OSVVM'...
remote: Enumerating objects: 91, done.
remote: Counting objects: 100% (91/91), done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 746 (delta 53), reused 66 (delta 28), pack-reused 655
Receiving objects: 100% (746/746), 18.04 MiB | 2.54 MiB/s, done.
error: RPC failed; curl 56 Failure when receiving data from the peer
Resolving deltas: 100% (402/402), done.

Where can I find out more about this "RPC failed; curl 56 Failure when receiving data from the peer"?

2 Answers

This is likely due to your use of a proxy. There are known to be various issues with many proxies, especially filtering proxies, including failure to speak the protocol properly (including chunked transfer encoding, which Git uses extensively), inability to handle large payloads, modification or other tampering of the data, and all sorts of other infelicities. Other things may work because they are not as large, because they have a known Content-Length, or because the data stream doesn't by happenstance contain some bad word or other magic pattern; that doesn't mean your proxy isn't broken.

Your best bet is to completely uninstall any third-party antivirus or firewall tools if you're on Windows and to avoid using any proxy or SSL/TLS MITM device, changing networks if necessary, in which case things will probably just work. If you can't do that, then you should generate an SSH key pair and use SSH instead, because most proxies don't intercept that.

If you're in a corporate environment, you should also provide feedback to your network team that their proxy is misconfigured and broken so that they can fix it.

Update the http post buffer value and try

git config --global http.postBuffer 1048576000
Related