git clone時報RPC failed; curl 18 transfer closed with outstanding read data remaining 錯誤html
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
1,緣由是由於curl的postBuffer的默認值過小,咱們須要調整它的大小,在終端從新配置大小java
解決方法:命令行輸入git
git config --global http.postBuffer 924288000
這裏咱們把postBuffer的值配置成900M。能夠根據本身須要下載的文件大小,將postBuffer值配置成合適的大小。bash
能夠根據如下命令查看postBuffer網絡
git config --list
2,執行上面命令若是依舊clone失敗,考慮可能緣由2:網絡下載速度緩慢ssh
解決方法:命令行輸入curl
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
3,若是依舊clone失敗,則首先淺層clone,而後更新遠程庫到本地gitlab
git clone --depth=1 http://gitlab.xxx.cn/yyy/zzz.git git fetch --unshallow
4,使用ssh進行拉取post
生成本地ssh公鑰:fetch
ssh-keygen -t rsa -C "pannn@xxx.com.cn"
一路回車便可;進入指定位置打開公鑰文件,打開復制內容粘貼到gitlab的ssh配置頁面。
gitlab添加ssh key
保存,完成,再次經過git bash窗口clone項目便可
git clone git@192.168.1.100:xxx/xxxxx.git