git clone 时,出现“error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)”错误

  1. 将 Git 的 HTTP 传输切换到 HTTP/1.1,有可能会绕过此问题。

    使用下面的命令设置:
     git config --global http.version HTTP/1.1
    
  2. 上面的错误下面一般还会有别的错误提示,如:“error: 2991 bytes of body are still expected”,说明传输的大小超了。
    使用下面的命令增加时长、大小等方面的设置。

     git config --global http.postBuffer 524288000
     git config --global http.lowSpeedLimit 0
     git config --global http.lowSpeedTime 999999

你可能感兴趣的:(git)