fatal: unable to access 'https://github.com/xxx/': HTTP/2 stream 1 was not closed cleanly before end of the underlying stream

push时候一直提示这个错误,网上有几个方法,基本都是推荐将git的通信协议由 http/2 改为 http/1.1

http/2 和 http/1.1之间有个区别是“HTTP2 基于 SPDY,专注于性能,最大的一个目标是在用户和网站间只用一个连接”

于是关闭所有github所有页面,关闭所有和github之间的连接,然后再次push,就成功了。

附将通信协议由 http/2 改为 http/1.1 的方法

$ git config --global http.version HTTP/1.1

 

posted @ 2023-02-08 15:40  乱炖er  阅读(681)  评论(0编辑  收藏  举报