问题
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