克隆代码仓库异常
hewenqi$git clone https://github.com/hewen1125/clair.git
正克隆到 'clair'...
remote: Enumerating objects: 8866, done.
error: RPC 失败。curl 18 transfer closed with outstanding read data remaining
fatal: 远端意外挂断了
fatal: 过早的文件结束符(EOF)
fatal: index-pack 失败
代码仓库过大导致 git clone 异常,调整传输参数即可,其中 524288000 = 500*1024*1024,即 500M。
git config --global http.postBuffer 524288000
参数说明参见 git-config 其中关于 http.postBuffer 的说明如下
http.postBuffer
Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system.
For requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used to avoid
creating a massive pack file locally. Default is 1 MiB, which is sufficient for most requests.