RPC failed; result=28, HTTP code = 0

后端 未结 5 2103
有刺的猬
有刺的猬 2021-01-04 06:18

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         


        
相关标签:
5条回答
  • 2021-01-04 06:48

    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"

    0 讨论(0)
  • 2021-01-04 06:49

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

    0 讨论(0)
  • 2021-01-04 06:51

    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 讨论(0)
  • 2021-01-04 06:58

    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.

    0 讨论(0)
  • 2021-01-04 07:15

    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.

    0 讨论(0)
提交回复
热议问题