欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

搞定Git clone错误:RPC失败和HTTP2框架层致命错误(curl 16)

最编程 2024-02-04 18:52:57
...

成功解决git clone遇到的error: RPC failed; curl 16 Error in the HTTP2 framing layer fatal: expected flush af

  • 问题描述
  • 解决方案

问题描述

用git的时候可能会遇到这个问题:

(base) zhouzikang@7443-8x4090-120:~/project$ git clone https://github.com/123/123.git
Cloning into ‘StyleSwap’…
error: RPC failed; curl 16 Error in the HTTP2 framing layer
fatal: expected flush after ref listing
如图在这里插入图片描述

解决方案

尝试通过像这样设置 git config 来强制 git 使用 HTTP 1.1

git config --global http.version HTTP/1.1

然后使用git操作

如果你想将其设置回 HTTP2,你可以这样做

git config --global http.version HTTP/2

成功解决如图:
在这里插入图片描述

顺带解决Git Clone遇到的:GnuTLS recv error (-110): The TLS connection was non-properly terminated.

apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000