开发者

RPC failed; result=28, HTTP code = 0

I'm trying to push my 开发者_如何学JAVAcode into github, but almost everytime I meet this error

error: RPC failed; result=28, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

It's so annoying. Anyone knows how to fix this?

Update After I googled, I read that running git config --global http.postBuffer 524288000 could solve the problem. But even after I ran that command, I still met the problem.


Use git:// or git+ssh://, not https


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.


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"


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.

  1. Check the timeouts on the server side, if you can control it. They may be too small. This depends on the server implementation.
  2. Check your repository for large files particularly binary files. These can be handled differently.
  3. Ensure you aren't setting http.lowSpeedLimit, http.lowSpeedTime inadvertently: they should be off by default (by looking at the code).

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜