Github Push Error: RPC failed; result=22, HTTP code = 413

前端 未结 17 830
迷失自我
迷失自我 2020-11-28 02:27

stupid issue with Github going on right now. I have a decent amount of changes (~120MB in size), when I attempt to push, this is what happens:

error: RPC fai         


        
相关标签:
17条回答
  • 2020-11-28 02:44

    The error occurs in 'libcurl', which is the underlying protocol for https upload. Solution is to somehow updgrade libcurl. To get more details about the error, set GIT_CURL_VERBOSE=1

    https://confluence.atlassian.com/pages/viewpage.action?pageId=306348908

    Meaning of error, as per libcurl doc: CURLE_HTTP_RETURNED_ERROR (22)

    This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is >= 400.

    http://curl.haxx.se/libcurl/c/libcurl-errors.html

    0 讨论(0)
  • 2020-11-28 02:45

    If you get error 413, then the issue doesn't lie with git but with your web server. It's your web server that is blocking big upload files.

    Solution for nginx

    Just load your nginx.conf and add client_max_body_size 50m; ( changing the value to your needs ) in the http block.

    Reload nginx to accept the new config by executing sudo service nginx reload and try again to push your commit over http.

    Solution for Apache

    In your httpd.conf add LimitRequestBody 52428800 ( changing the value to your needs ) inside a <Directory /> block. Doing this you can limit the request of the whole server filesystem, just a single Virtual Host or a directory.

    I hope this helps.

    0 讨论(0)
  • 2020-11-28 02:45

    command to change the remote url ( from https -> git@... ) is something like this

    git remote set-url origin git@github.com:GitUserName/GitRepoName.git
    

    origin here is the name of my remote ( do git remote and what comes out is your origin ).

    0 讨论(0)
  • 2020-11-28 02:46

    I had the same issue (on Win XP), I updated the libcurl-4.dll file in my Git bin directory to the SSL version from http://www.paehl.com/open_source/?download=curl_DLL_ONLY.7z (renaming to libcurl4.dll). All working ok now.

    0 讨论(0)
  • 2020-11-28 02:49

    I got this problem when I try to clone a git repo in Linux machine.

    the following URL is working for me in windows

    http://swamy@git.swamy.com/scm/project/swamy-main.git
    

    whereas the following URL works in Linux machine and it has https in URL

    https://swamy@git.swamy.com/scm/project/swamy-main.git
    
    0 讨论(0)
  • 2020-11-28 02:51

    when I used the https url to push to the remote master, I met the same proble, I changed it to the SSH address, and everything resumed working flawlessly.

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