git在push错误HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

错误描述:

git在push时候出现错误,完整错误如下:
Push failed
		Enumerating objects: 269, done.
		Delta compression using up to 4 threads
		Total 197 (delta 122), reused 0 (delta 0)
		RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
		the remote end hung up unexpectedly
		the remote end hung up unexpectedly

错误解决:

1、因为提示the remote end hung up unexpectedly,远程连接意外的断开,以为是网络的原因,但是测试之后发现网络是异常的。
2、之前有遇到提交失败,有可能是文件过大的原因,但是发现提交的都是类文件以及配置文件,不可能过大。
3、最后才发现错误重点在这里RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1),网上有说这是HTTP/2的bug,
既然如此,我们就不要使用HTTP/2了,将git的http.version改为1.1即可,配置如下:
git config --global http.version HTTP/1.1。
再次提交,ok,成功。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章