成功解决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 config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400
顺带解决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
![](https://i-blog.csdnimg.cn/blog_migrate/ffde4891600419731c531d82055315ed.png)
♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠