I\'m trying to push my code into github, but almost everytime I meet this error
error: RPC failed; result=28, HTTP code = 0
fatal: The remote end hung up un
I met the same problem( working behind a proxy and not able to access git://)
maybe it depends on the network situation?
do the "push" more times and it works for me. (pushed total 5 times, 2 successful)
btw, I am using the "https_proxy" environment variable, not the "http_proxy"
Use git:// or git+ssh://, not https
Generally these error conditions and codes are due to a network misconfiguration or unreliable internet connectivity at the moment. Usually after a few tries, everything should be back to normal. Try different connection protocols if problem persists after several tries.
It is not necessary to use SSH here as mentioned in the accepted answer. Recently got stuck with the same issue. Increase the Http default 1 MiB buffer size to a large value:
git config --global http.postBuffer 1048576000
then try git push remote branch_name
.
Hope it helps somebody.
That error code is a timeout error on the client. Although I suspect that the server-side is closing as the message suggests. To try and get more information you could try setting the environment variable GIT_CURL_VERBOSE=1
for your push eg:
GIT_CURL_VERBOSE=1 git push origin
This can give you an indication of whether it is the client timing out or the server disconnecting that is the original error. There are a number of things you might do to ensure that you're not always coming across this error.
Large Repository
For point 2. There are a number of things you can do if you suspect that the pack you are pushing is large objects. This blog post is quite detailed on the subject:
http://blogs.atlassian.com/2014/05/handle-big-repositories-git/
I don't think the http.postBuffer is really a solution here.