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.
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.
You can force git using http version 1.1
git config --global http.version HTTP/1.1
https://gist.github.com/daofresh/0a95772d582cafb202142ff7871da2fc
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
XCode 11.4.1
Increasing the git buffer size worked for me
git config --global http.postBuffer 524288000
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.
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;
Working Solution : First change HTTp version to 1.1 and then push and once done change back to HTTP2
$ git config --global http.version HTTP/1.1 After it push was ok and I have changed HTTP version to 2 again: $ git config --global http.version HTTP/2
In my case I had to reset the origin to ssh instead of http/https:
git remote set-url origin git@your-git.com
To check your origins you can use:
git remote -v