error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

半世苍凉 提交于 2020-05-14 18:43:28

问题


error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

I tried 'push' while writing 'git'. However, the following message does not solve the problem.


回答1:


You can force git using http version 1.1

git config --global http.version HTTP/1.1

https://gist.github.com/daofresh/0a95772d582cafb202142ff7871da2fc




回答2:


You might be pushing data larger than the postBuffer size.

You can try increasing post buffer size using git config --global http.postBuffer 157286400

For reference: https://confluence.atlassian.com/bitbucketserverkb/git-push-fails-fatal-the-remote-end-hung-up-unexpectedly-779171796.html




回答3:


It sounds like either the remote server you're using or some middlebox (e.g., a proxy) is not speaking the HTTP/2 protocol correctly. You can either fix that by asking the owner of that remote server or middlebox to fix their server, or you can force the use of HTTP/1.1.

If you want to force the use of HTTP/1.1, you can set the http.version configuration option to HTTP/1.1. That can also be set on a per-URL basis as described in the http.<url>.* section in the git-config manual page.




回答4:


For my case with the bitbucket behind nginx, disabling proxy request buffering was the answer:

server {
    listen 443 ssl http2 default_server;
    ...
    proxy_request_buffering off;

    # These are also relevant:
    proxy_read_timeout      600;
    client_max_body_size    0;


来源:https://stackoverflow.com/questions/59282476/error-rpc-failed-curl-92-http-2-stream-0-was-not-closed-cleanly-protocol-erro

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!