error: RPC failed; curl 18 transfer closed with outstanding read data remaining
The connection dropped during a git transfer
Seen in git clone, fetch and push over HTTPS (curl 18, 56 and 92 variants)
The HTTPS connection carrying the git data was cut off before the transfer finished.
Common causes
- An unstable network, VPN or Wi-Fi link dropped a long-running transfer.
- A proxy, firewall or antivirus closed the connection mid-transfer (often on large repositories).
- An HTTP/2 problem between git and the server or proxy (curl 92).
How to fix it
- Retry on a stable connection, or clone over SSH instead of HTTPS.
- Clone less data first: git clone --depth 1 <url>, then git fetch --unshallow.
- Force HTTP/1.1 if the error mentions HTTP/2: git config --global http.version HTTP/1.1.
Got a different message? Paste it into the error explainer.
Related errors
- error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 · The push is larger than the server or proxy accepts
- fatal: the remote end hung up unexpectedly · The Git server closed the connection
- kex_exchange_identification: Connection closed by remote host · The SSH server closed the connection before the handshake
- Permission denied (publickey) · The server rejected every SSH key you offered
- Host key verification failed. · SSH couldn't confirm the server's identity
- WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! · The server's SSH host key is different from last time
- Unable to negotiate with 203.0.113.10 port 22: no matching host key type found. Their offer: ssh-rsa · The server only offers an old host key type
- Unable to negotiate with 203.0.113.10 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 · Client and server share no key exchange algorithm
- Received disconnect from 203.0.113.10 port 22:2: Too many authentication failures · The client offered too many keys before the right one
- Connection closed by 203.0.113.10 port 22 · The SSH server ended the session
- npm ERR! code ETIMEDOUT · npm couldn't reach the registry in time
- npm ERR! code ERR_SOCKET_TIMEOUT · The registry connection went silent