git 配置下載大小


 

RPC failed; curl 18 transfer closed with outstanding read data remaining the remote end hung up unexpectedly early EOF index-pack failed

 

解決方案也是網上搜的,總結一下

一,加大緩存區
git config --global http.postBuffer 524288000
這個大約是500M
二、少clone一些,–depth 1
git clone https://github.com/flutter/flutter.git --depth 1
–depth 1的含義是復制深度為1,就是每個文件只取最近一次提交,不是整個歷史版本。
三、換協議
clone http方式換成SSH的方式,即 https:// 改為 git://
例如git clone https://github.com/flutter/flutter.git
換成git clone git://github.com/flutter/flutter.git

 

 

原因1:緩存區 溢出

解決方法:命令行輸入

git config http.postBuffer 524288000

執行上面命令如果依舊clone失敗,在繼續看下面

原因2:網絡下載速度 緩慢

解決方法:命令行輸入

git config --global http.lowSpeedLimit 0

git config --global http.lowSpeedTime 999999

原因3:訪問國外資料網絡限制或者不穩定下載速度 緩慢

打開VPN是,一切OK

 

git config --global http.postBuffer 1048576000


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM