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

成功解决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

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

猜你喜欢

转载自blog.csdn.net/qq_45934285/article/details/131736984
今日推荐