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.
複製代碼
相關文章
相關標籤/搜索