问题一
在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
问题三
今天拉取代码,出现如下所示错误:文章来源:https://www.toymoban.com/news/detail-805474.html
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
迟迟拉不下来.文章来源地址https://www.toymoban.com/news/detail-805474.html
解决
# 如果是针对当前项目(5G Buffer Storage)
$ git config --local http.postBuffer 5000000000
# 如何是针对全局项目(5G Buffer Storage)
$ git config --global http.postBuffer 5000000000
到了这里,关于完美解决ubuntu中git clone安卓内核时报error: RPC failed; curl 56 GnuTLS recv error (-9):错误的处理的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!