Ubuntu: How to deal with the fatal: the remote end hung up unexpected error of GIT clone Android kernel


Use git command to clone Android kernel from Tsinghua open source software image station in Ubuntu, but the following error is reported:

$ 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

Treatment method

After querying some blogs, this error is summed up as the reason why the file is too large

According to the method of the first problem in reference 1, execute the following commands respectively to solve the problem:

Set git minimum speed
$ git config --global http.lowSpeedLimit 0
$ git config --global http.lowSpeedTime 999999
Set http cache
$ git config --global http.postBuffer 1048576000

Among them, postbuffer is used to set HTTP cache, which can be set larger, such as 1g: git config — global http.postbuffer 1048576000, or 3G 3194304000

Read More: