413 ошибка git

https clone of gists fails (ssh works, see below):

12:00 jean@laptop:~/tmp$ GIT_CURL_VERBOSE=1 git clone https://gist.github.com/123456.git username
Initialized empty Git repository in /home/jean/tmp/username/.git/
* Couldn't find host gist.github.com in the .netrc file; using defaults
* About to connect() to gist.github.com port 443 (#0)
*   Trying 192.30.252.142... * Connected to gist.github.com (192.30.252.142) port 443 (#0)
* found 141 certificates in /etc/ssl/certs/ca-certificates.crt
*        server certificate verification OK
*        common name: *.github.com (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: RSA
*        certificate version: #3
*        subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=*.github.com
*        start date: Mon, 30 Apr 2012 00:00:00 GMT
*        expire date: Wed, 09 Jul 2014 12:00:00 GMT
*        issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance CA-3
*        compression: NULL
*        cipher: ARCFOUR-128
*        MAC: SHA1
> GET /123456.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept: */*
Pragma: no-cache

< HTTP/1.1 301 Moved Permanently
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:51 GMT
< Content-Type: text/html
< Content-Length: 178
< Location: https://gist.github.com/gist/123456.git/info/refs?service=git-upload-pack
< Vary: Accept-Encoding
<
* Ignoring the response-body
* Expire cleared
* Connection #0 to host gist.github.com left intact
* Issue another request to this URL: 'https://gist.github.com/gist/123456.git/info/refs?service=git-upload-pack'
* Couldn't find host gist.github.com in the .netrc file; using defaults
* Re-using existing connection! (#0) with host gist.github.com
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
> GET /gist/123456.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept: */*
Pragma: no-cache

< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:52 GMT
< Content-Type: application/x-git-upload-pack-advertisement
< Transfer-Encoding: chunked
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
<
* Connection #0 to host gist.github.com left intact
* Couldn't find host gist.github.com in the .netrc file; using defaults
* About to connect() to gist.github.com port 443 (#0)
*   Trying 192.30.252.142... * connected
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
* found 141 certificates in /etc/ssl/certs/ca-certificates.crt
* SSL re-using session ID
*        server certificate verification OK
*        common name: *.github.com (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: RSA
*        certificate version: #3
*        subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=*.github.com
*        start date: Mon, 30 Apr 2012 00:00:00 GMT
*        expire date: Wed, 09 Jul 2014 12:00:00 GMT
*        issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance CA-3
*        compression: NULL
*        cipher: ARCFOUR-128
*        MAC: SHA1
> POST /123456.git/git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept-Encoding: deflate, gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 116

< HTTP/1.1 301 Moved Permanently
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:53 GMT
< Content-Type: text/html
< Content-Length: 178
< Location: https://gist.github.com/gist/123456.git/git-upload-pack
< Vary: Accept-Encoding
<
* Ignoring the response-body
* Connection #0 to host gist.github.com left intact
* Issue another request to this URL: 'https://gist.github.com/gist/123456.git/git-upload-pack'
* Violate RFC 2616/10.3.2 and switch from POST to GET
* Couldn't find host gist.github.com in the .netrc file; using defaults
* Re-using existing connection! (#0) with host gist.github.com
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
> GET /gist/123456.git/git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept-Encoding: deflate, gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result

* The requested URL returned error: 400
* Closing connection #0
error: RPC failed; result=22, HTTP code = 400

This works: git clone git@gist.github.com:123456.git

The error «RPC failed; result=22, HTTP code = 413» is a common issue faced by Github users when pushing changes to a remote repository. This error message indicates that the request to push the changes is too large and the Github server is unable to handle it. In this case, the server returns a 413 HTTP status code, which means «Request Entity Too Large».

Method 1: Reduce the size of the repository

To fix the Github Push Error: RPC failed; result=22, HTTP code = 413, you can reduce the size of the repository. Here are the steps to do it:

  1. Identify the large files in your repository using the following command:
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | awk '/^blob/ {print substr($0,6)}' | sort --numeric-sort --key=2 | cut --complement --characters=13-40 --stable | gnumfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
  1. Once you have identified the large files, you can remove them from the repository using the following command:
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch <path-to-large-file>' --prune-empty --tag-name-filter cat -- --all
  1. After removing the large files, you can run the following command to compress the repository:
git gc --aggressive --prune=now
  1. Finally, force push the changes to the remote repository using the following command:
git push --force origin <branch-name>

By following these steps, you should be able to fix the Github Push Error: RPC failed; result=22, HTTP code = 413.

Method 2: Increase the HTTP post buffer size

To fix the Github Push Error: RPC failed; result=22, HTTP code = 413, you can increase the HTTP post buffer size by following these steps:

  1. Open Git Bash or Terminal.
  2. Navigate to your Git repository.
  3. Run the following command to increase the buffer size:
git config http.postBuffer 524288000

This command sets the buffer size to 500MB, but you can adjust the size to your preference.

  1. Try pushing your changes to Github again.

If the error persists, you can try increasing the buffer size further.

git config http.postBuffer 1048576000

This command sets the buffer size to 1GB.

  1. Try pushing your changes to Github again.

If the error still persists, you may need to contact Github support for further assistance.

Note: Increasing the buffer size may not always solve the issue, as it could be caused by other factors such as network connectivity or server issues.

I hope this helps you resolve your Github Push Error: RPC failed; result=22, HTTP code = 413 issue.

Method 3: Use Git Large File Storage (LFS)

If you encounter the Github Push Error: RPC failed; result=22, HTTP code = 413 when pushing large files to Github, you can solve this issue by using Git Large File Storage (LFS).

Step 1: Install Git LFS

First, you need to install Git LFS on your local machine. You can download and install it from the official Git LFS website or use your operating system’s package manager.

Step 2: Initialize Git LFS

Once you have installed Git LFS, you need to initialize it in your Git repository. Run the following command in your repository directory:

This will set up Git LFS for your repository.

Step 3: Track large files with Git LFS

Next, you need to track the large files in your repository with Git LFS. Run the following command to track all files with a .pdf extension:

This will create a .gitattributes file in your repository that tells Git LFS which files to track.

Step 4: Commit and push changes

Commit the .gitattributes file and the large files you want to push to Github:

git add .gitattributes large_file.pdf
git commit -m "Add large_file.pdf and .gitattributes"

Then push the changes to Github:

Step 5: Verify Git LFS usage

You can verify that Git LFS is being used for your large files by running the following command:

This will list all the files that are being tracked by Git LFS.

That’s it! By using Git LFS, you can push large files to Github without encountering the Github Push Error: RPC failed; result=22, HTTP code = 413.

Method 4: Split the large repository into smaller ones

If you are encountering the Github push error with RPC failed and result=22, HTTP code = 413, it may be due to the large size of your repository. To fix this issue, you can split the large repository into smaller ones. Here is how you can do it:

Step 1: Clone the Large Repository

First, clone the large repository to your local machine using the following command:

git clone https://github.com/username/repo.git

Step 2: Create a New Repository

Create a new repository on Github for each subdirectory you want to split from the large repository.

Step 3: Split the Large Repository

To split the large repository into smaller ones, use the following commands:

git filter-branch --prune-empty --subdirectory-filter path/to/directory -- --all

This command will create a new branch with only the files and history of the specified subdirectory.

Step 4: Push the New Repository

Now, push the new repository to Github using the following commands:

git remote add newrepo https://github.com/username/newrepo.git
git push newrepo branchname

Replace «newrepo» with the name of the new repository you created in Step 2, and «branchname» with the name of the branch you created in Step 3.

Step 5: Repeat for Other Subdirectories

Repeat Steps 3 and 4 for each subdirectory you want to split from the large repository.

Problem

Pushing attempt with Git LFS results in when cloning, pushing or pulling/fetching, the client may fail like so:

$ git push origin master # using SSH
Git LFS: (186 of 187 files, 4 skipped) 268.25 MB / 448.34 MB, 17.66 MB skipped
Client error: https://your.bitbucket.com/rest/git-lfs/storage/proj/repo/84c72136e4d22c2c42819d902b4400a9cf73f2b04fd6f9f8666739c3bc0a0f79 from HTTP 413
Client error: https://your.bitbucket.com/rest/git-lfs/storage/proj/repo/1c9335681f70363edeb00820ef394fac66125856cca0c3c8cf2c66636739f277 from HTTP 413
Client error: https://your.bitbucket.com/rest/git-lfs/storage/proj/repo/e79f7abda0ba90f2be4e613f78d1ecb7344970711106fe80d0028106f97f613c from HTTP 413
error: failed to push some refs to 'ssh://git@your.bitbucket.com:7999/proj/repo.git'

Cause

This indicates the repository does not have LFS enabled. A user with REPO_ADMIN permissions is able to enable LFS support.

Analysis

The following come up on different logs:

atlassian-bitbucket.log

2016-02-02 14:03:12,626 INFO [NioProcessor-8] c.a.b.i.s.s.SelfClosingChannelSession Executing command: git-receive-pack '/proj/repo.git' 

atlassian-bitbucket-access.log

192.168.1.10 | ssh | i@1PQD53Ux843x157553x0 | user | 2016-02-02 14:03:12,626 | SSH - git-receive-pack '/proj/repo.git' | - | - | - | - | - | - | os4we8 |

atlassian-bitbucket.log

2016-02-02 14:03:13,050 INFO [NioProcessor-9] c.a.b.i.s.s.SelfClosingChannelSession Executing command: git-lfs-authenticate proj/repo.git upload

atlassian-bitbucket-access.log

192.168.1.10 | ssh | i@1PQD53Ux843x157554x1 | user | 2016-02-02 14:03:13,050 | SSH - git-lfs-authenticate proj/repo.git upload | - | - | - | - | - | - | 6pp10j |
192.168.1.10 | ssh | o@1PQD53Ux843x157554x1 | user | 2016-02-02 14:03:13,067 | SSH - git-lfs-authenticate proj/repo.git upload | - | 0 | 0 | 552 | ssh:user:id:1 | 17 | 6pp10j |
192.168.1.10,127.0.0.1 | https | i@1PQD53Ux843x157555x1 | - | 2016-02-02 14:03:13,575 | "POST /scm/proj/repo.git/info/lfs/objects/batch HTTP/1.0" | "" "git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1)" | - | - | - | - | - | - |
192.168.1.10,127.0.0.1 | https | o@1PQD53Ux843x157555x1 | user | 2016-02-02 14:03:13,669 | "POST /scm/proj/repo.git/info/lfs/objects/batch HTTP/1.0" | "" "git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1)" | 200 | 8907 | 12064 | - | 94 | 1d9nj3u |

nginx

2016/02/02 14:00:46 [error] 16062#0: *1224429 client intended to send too large body: 21693741 bytes, client: 4.3.2.1, server: stash.example.com, request: "PUT /rest/git-lfs/storage/MAIN/repo/e79f7abda0ba90f2be4e613f78d1ecb7344970711106fe80d0028106f97f613c HTTP/1.1", host: "stash.example.com"

In addition…

You can run a Git DEBUG. On the example we saw, the response by nginx was saying «too-large header».

$ GIT_TRACE=1 git push
14:44:49.161648 git.c:348 trace: built-in: git 'push'
...
trace git-lfs: tq: starting 3 transfer workers
trace git-lfs: tq: running as batched queue, batch size of 100
trace git-lfs: tq: sending batch of size 4
...
trace git-lfs: api: batch 4 files
trace git-lfs: HTTP: POST https://stash.example.com/scm/main/repo.git/info/lfs/objects/batch
trace git-lfs: HTTP: 200
trace git-lfs: HTTP: {"objects":[{"oid":"1bd91c03...62dbaa79","size":2746892,"actions":{}},{"oid":"58ef47926...70bb6ea89c","size":10639089,"actions":{}},{"oid":"2631c0...c6f6be538","size":2890471,"actions":{}},{"oid":"84c721...bc0a0f79","size":72016893,"actions":{"upload":{"href":"https://stash.example.com/rest/git-lfs/storage/MAIN/repo/84c72136
trace git-lfs: HTTP: e4d22c2...c0a0f79","header":{"Authorization":"JWT eyJ0e...NzA0NW
trace git-lfs: HTTP: IwOD...ifYKU"}}}}]}
trace git-lfs: HTTP:
Git LFS: (0 of 4 files, 3 skipped) 0 B / 84.20 MB, 15.52 MB skipped trace git-lfs: HTTP: PUT https://stash.example.com/rest/git-lfs/storage/MAIN/repo/84c72136e4...9c3bc0a0f79
trace git-lfs: HTTP: 413
trace git-lfs: HTTP: <html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx/1.9.3 (Ubuntu)</center>
</body>
</html>
...
Git LFS: (2 of 4 files, 3 skipped) 262.52 KB / 84.20 MB, 15.52 MB skipped
Client error: https://stash.example.com/rest/git-lfs/storage/MAIN/repo/84c7213...a0f79 from HTTP 413
error: failed to push some refs to 'ssh://git@stash.example.com:7999/main/repo.git'
$

Resolution

  • This usually happens if you have a reverse proxy that does not allow a header that is too big. Please configure your HTTP proxy correctly.
  • The fix for nginx is to add/modify this server setting for the relevant vhost pointing to bitbucket server, modified for the maximum size of file you intend to store via git-lfs:

    client_max_body_size 256M;

Even if you perform Git LFS operations over SSH, they are actually done of HTTPS.

preface

Recently, one of my team members told me that he couldn’t git commit code. I asked the reason and he said he would report the code as soon as it was submitted

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

Then he told me that he had tried several methods, but none of them worked. The following list of his Baidu out of the scheme

Change the size of the local Git PostBuffer

git config --global http.postbuffer 524288000

Plan 2: Modify the project. Git /config file and add the following contents

[http]  
    postBuffer = 524288000

Scheme 3: Increase the Maximum Attachment Size (MB) and Maximum Push Size (MB) with the Account and Limit of the management Account in GitLab

Can refer to this link https://blog.csdn.net/techfield/article/details/70198077 as junior partner not administrator, behind I tried it, it doesn’t work

The problem’s analyse

1. First look at the problems thrown by git push

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

The only information available to us is probably the status code 413, so we can start with that

This status code means

413 Request Entity Too Large

The server refuses to process the current request because the size of the entity submitted by the request is larger than the server is willing or able to process. In this case, the server can close the connection to prevent the client from sending the request further.

Note: check the HTTP status code information, can be refer to by https://www.php.cn/web/web-http.html

From the meaning of the status code, we can conclude that the uploaded code may be too large. So I asked my friend to look at the amount of code he uploaded, and, boy, it’s 4,50 megabytes

2. Solutions

Plan 1: Upload the code in batches, not all at once

My friend solved the problem according to this plan, but he said it was troublesome, because it was impossible to upload the code in batches every time, because the efficiency of submitting the code was very low

Plan 2: Increase the size of HTTP uploads

The solution is to set the postBuffer in the first place, but the problem is that it doesn’t work. Later, I wondered if it was because of the configuration of the domain name, so I used the Intranet IP way to push the code directly, and the result was actually OK.

Then I went to Ping Gitlab domain name, and found that the IP was not Gitlab’s internal network IP, of course, it could be the external network IP, so I pinged the IP through Baidu, shows that the IP is a local area network.

Then it’s natural to wonder if the project’s GitLab has an agent configured, and then ask the former colleagues who took the GitLab. Sure enough, he used Nginx as the agent to build this GitLab before, so he derived the third scheme

Scenario 3: Modify the NGINX configuration

Add client_max_body_size to the HTTP Server node as follows

http: { server: { client_max_body_size: 200m; }}

Scenario 4: Submit code using SSH

Configure SSH, you can refer to the following link https://blog.csdn.net/qq_42832446/article/details/105533733

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 failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly 
fatal: The remote end hung up unexpectedly

I’ve already done

git config http.postBuffer 524288000, so that doesn’t seem to be the issue. What could it be?


Solution 1

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.


Solution 2

I figured it out!!! Of course I would right after I hit post!

I had the repo set to use the HTTPS url, I changed it to the SSH address, and everything resumed working flawlessly.


Solution 3

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 ).


Solution 4

I had the same problem but I was using a reverse proxy.

So I had to set

client_max_body_size 50m; 

inside both configure files :

  • on the gitlab nginx web server (as said inside the previous answers)
  • but also on the nginx reverse proxy hosted on the dedicated server.

Solution 5

If you are facing this issue while pushing changes in big size then run below command in terminal.

git config --global http.postBuffer 157286400

See this for more details.


Solution 6

I already had “HTTPS//” in the git URL yet faced this error.

All I did was to add option -u with push and it worked.

git push -u origin master


Solution 7

For those who use IIS 7 to host a git http/https endpoint:

You need to increase your uploadReadAheadSize.

Launch Internet Information Services (IIS) Manager

  1. Expand the Server field

  2. Expand Sites

  3. Select the site you want to make the modification for.

  4. In the Features section, double click Configuration Editor

  5. Under Section select: system.webServer > serverRuntime

  6. Modify the uploadReadAheadSize section (The value must be between 0 and 2147483647.)

  7. Click Apply

  8. Restart the Website


Solution 8

Do you use https links instead of ssh links? Because the https link is limited by the size of the upload of HttpServer (such as Apache, Ngnix), there is no such restriction when using ssh.

Use the following method to switch to the ssh link.

  1. Open terminal.
  2. Switch to your project’s working directory.
  3. Get the name of the remote repository
$ git remote -v
origin  https://github.com/[user_name]/[project_name].git (fetch)
origin  https://github.com/[user_name]/[project_name].git (push)
  1. Modify the git address to ssh link.
git remote set-url origin git@github.com:[user_name]/[project_name].git

If you determine the remote repository name, proceed directly to step 4.
Now, you can do the push operation happily.


Solution 9

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


Solution 10

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

Solution 11

I had this error (error: RPC failed; result=22, HTTP code = 413) when I tried to push my initial commit to a new BitBucket repository. The error occurred for me because the BitBucket repo had no master branch. If you are using SourceTree you can create a master branch on the origin by pressing the Git Flow button.


Solution 12

Need to change remote url to ssh or https

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

or

git remote set-url origin https://github.com/laravel/laravel.git

Hope, this will help 🙂


Solution 13

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.


Solution 14

https clone of gists fails (ssh works, see below):

12:00 jean@laptop:~/tmp$ GIT_CURL_VERBOSE=1 git clone https://gist.github.com/123456.git username
Initialized empty Git repository in /home/jean/tmp/username/.git/
* Couldn't find host gist.github.com in the .netrc file; using defaults
* About to connect() to gist.github.com port 443 (#0)
*   Trying 192.30.252.142... * Connected to gist.github.com (192.30.252.142) port 443 (#0)
* found 141 certificates in /etc/ssl/certs/ca-certificates.crt
*        server certificate verification OK
*        common name: *.github.com (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: RSA
*        certificate version: #3
*        subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=*.github.com
*        start date: Mon, 30 Apr 2012 00:00:00 GMT
*        expire date: Wed, 09 Jul 2014 12:00:00 GMT
*        issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance CA-3
*        compression: NULL
*        cipher: ARCFOUR-128
*        MAC: SHA1
> GET /123456.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept: */*
Pragma: no-cache

< HTTP/1.1 301 Moved Permanently
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:51 GMT
< Content-Type: text/html
< Content-Length: 178
< Location: https://gist.github.com/gist/123456.git/info/refs?service=git-upload-pack
< Vary: Accept-Encoding
<
* Ignoring the response-body
* Expire cleared
* Connection #0 to host gist.github.com left intact
* Issue another request to this URL: 'https://gist.github.com/gist/123456.git/info/refs?service=git-upload-pack'
* Couldn't find host gist.github.com in the .netrc file; using defaults
* Re-using existing connection! (#0) with host gist.github.com
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
> GET /gist/123456.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept: */*
Pragma: no-cache

< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:52 GMT
< Content-Type: application/x-git-upload-pack-advertisement
< Transfer-Encoding: chunked
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
<
* Connection #0 to host gist.github.com left intact
* Couldn't find host gist.github.com in the .netrc file; using defaults
* About to connect() to gist.github.com port 443 (#0)
*   Trying 192.30.252.142... * connected
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
* found 141 certificates in /etc/ssl/certs/ca-certificates.crt
* SSL re-using session ID
*        server certificate verification OK
*        common name: *.github.com (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: RSA
*        certificate version: #3
*        subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=*.github.com
*        start date: Mon, 30 Apr 2012 00:00:00 GMT
*        expire date: Wed, 09 Jul 2014 12:00:00 GMT
*        issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance CA-3
*        compression: NULL
*        cipher: ARCFOUR-128
*        MAC: SHA1
> POST /123456.git/git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept-Encoding: deflate, gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 116

< HTTP/1.1 301 Moved Permanently
< Server: GitHub.com
< Date: Fri, 01 Nov 2013 05:00:53 GMT
< Content-Type: text/html
< Content-Length: 178
< Location: https://gist.github.com/gist/123456.git/git-upload-pack
< Vary: Accept-Encoding
<
* Ignoring the response-body
* Connection #0 to host gist.github.com left intact
* Issue another request to this URL: 'https://gist.github.com/gist/123456.git/git-upload-pack'
* Violate RFC 2616/10.3.2 and switch from POST to GET
* Couldn't find host gist.github.com in the .netrc file; using defaults
* Re-using existing connection! (#0) with host gist.github.com
* Connected to gist.github.com (192.30.252.142) port 443 (#0)
> GET /gist/123456.git/git-upload-pack HTTP/1.1
User-Agent: git/1.7.1
Host: gist.github.com
Accept-Encoding: deflate, gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result

* The requested URL returned error: 400
* Closing connection #0
error: RPC failed; result=22, HTTP code = 400

This works: git clone git@gist.github.com:123456.git


Solution 15

Was facing same issue.
In my case it was non-compatible GIT versions across multiple users who are accessing(pull/push) same project.

have just updated GIT version and updated the path on Android studio settings and its working fine for me.

Edit –

Git for Windows (1.9.5) having some problem, updating the same may helps.


Solution 16

Was facing the same issue however it got resolved by cleaning up the git repository (Clean untracked files using “git clean”).


Solution 17

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.


Solution 18

I was able to resolve this issue by increasing the size in the following line nginx[‘client_max_body_size’] = ‘Xm’ in the file /etc/gitlab/gitlab.rb

X= your value. The default value is 250.

After updating the file, run the re-configure command gitlab-ctl reconfigure


Solution 19

For those whose changes are not really huge in size and still getting this error.
I had the same error
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
you know what saved the day?

git pull --rebase

There were changes on the remote repo that were not in my local repo and just a simple rebase solved the issue. Talk about misleading error messages.

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • 413 toner empty убрать ошибку
  • 407 ошибка кассы
  • 409 ошибка xbox
  • 4128 ошибка настройки терминала сбербанк
  • 409 ошибка telebot

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии