天天看點

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,成功。