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