Github 使用指南

克隆代码仓库异常

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

git config --global http.postBuffer 524288000
复制代码

参数说明参见 git-config 其中关于 http.postBuffer 的说明以下github

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.
复制代码
相关文章
相关标签/搜索