@@ -130,10 +130,25 @@ remote: Calculating new repository size... (cancelled after 729ms)
This could be used to further investigate what operation is performing poorly
and provide GitLab with more information on how to improve the service.
## `curl 18 transfer closed with outstanding read data remaining` during `git clone` over HTTP
## `git clone` over HTTP fails with `transfer closed with outstanding read data remaining` error
This error usually indicates that the request is chunked, and the buffer size is smaller than the request. If the repository is large,
and if `git clone` only fails over HTTP after a number of objects have been pulled, consider increasing the `http.postBuffer` value.
If the buffer size is lower than what is allowed in the request, the action will fail with an error similar to the one below:
```text
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
```
This can be fixed by increasing the existing `http.postBuffer` value to one greater than the repository size. For example, if `git clone` fails when cloning a 500M repository, the solution will be to set `http.postBuffer` to `524288000` so that the request only starts buffering after the first 524288000 bytes.
NOTE: **Note:**
The default value of `http.postBuffer`, 1 MiB, is applied if the setting is not configured.
[Broken-Pipe]:https://stackoverflow.com/questions/19120120/broken-pipe-when-pushing-to-git-repository/36971469#36971469"StackOverflow: 'Broken pipe when pushing to Git repository'"