完美解决ubuntu中git clone安卓内核时报error: RPC failed; curl 56 GnuTLS recv error (-9):错误的处理

完美解决ubuntu中git clone安卓内核时报error: RPC failed; curl 56 GnuTLS recv error (-9):错误的处理

问题一

在ubuntu中使用git命令从清华的开源软件镜像站中克隆安卓内核,但是报如下错误:

$ git clone https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish
Cloning into 'goldfish'...
remote: Enumerating objects: 116, done.
remote: Counting objects: 100% (116/116), done.
remote: Compressing objects: 100% (69/69), done.
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

解决

查询了一些博客,这个错误总结出应该是文件过大的原因

根据参考1中的第一个问题的方法,分别执行如下命令,问题解决:

设置git最低速度
$ git config --global http.lowSpeedLimit 0
$ git config --global http.lowSpeedTime 999999
设置http缓存
$ git config --global http.postBuffer 1048576000

其中,postBuffer是用于设置Http缓存,可以设置的大一些,比如1G:git config --global http.postBuffer 1048576000,或者3G 3194304000

问题二

GnuTLS recv error (-9): Error decoding the received TLS packet

解决

# sudo apt install gnutls-bin
# git config --global http.sslVerify false
# git config --global http.postBuffer 1048576000 //增加至1GB缓存
 
//设置git最小和最大下载速度
# git config --global http.lowSpeedLimit 0
# git config --global http.lowSpeedTime 999999
 
//以下步骤大大加快git下载速度
# git config --global core.compression -1    
# export GIT_TRACE_PACKET=1
# export GIT_TRACE=1
# export GIT_CURL_VERBOSE=1
 
# sudo ifconfig eth0 mtu 14000

问题三

今天拉取代码,出现如下所示错误:

    error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.
    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed
    Failed during: git fetch origin --force

迟迟拉不下来.

解决

    # 如果是针对当前项目(5G Buffer Storage)
    $ git config --local http.postBuffer 5000000000
     
    # 如何是针对全局项目(5G Buffer Storage)
    $ git config --global http.postBuffer 5000000000
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

五一编程

程序之路有我与你同行

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值