git clone中断情况 error: RPC failed; result=35, HTTP code = 0 fatal: The remote end hung up un
作者:csuper
发表于:2021-07-12
出现这种git clone中断情况,屡试不爽,还以为是网络问题

$git config --help 翻页到这一看终于懂了。
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.
大致意思是远程便捷HTTP传输请求数据时最大的缓存字节数,默认时1M字节,默认能满足大多数请求。
恰好我这git clone的是个大文件,第一次配置git缓存值,
sudo git config --global http.postBuffer 524288000
还是不行,同样错误,那好,再来个零,5G,看你还行不行!
sudo git config --global http.postBuffer 5242880000
果然,OK了。
版权声明
本文仅代表作者观点,不代表Csuper立场。
本文系作者授权百度百家发表,未经许可,不得转载。