RPC Failed

RPC Failed errors and "The remote end hung up unexpectedly" are timeout related. If anything along the network fails (like poor WiFi) or some corporate firewall issue, then the Git connection breaks and this error is shown.

First thing to do is upgrade to the latest version of Git and CURL. Older versions of Git on Linux had bugs that caused this error. Also make sure that you have permissions to read and write to the directory in which you are instructing Git to clone or pull to.

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

The problem is with the version of Git. Works on 2.11.0, fails on 2.11.1 and above. The reason is a change introduced in 2.11.1 that is related to redirect security. You can work around this for ChipCode without opening up this vulnerability for all sites you may clone from by running the following command once and once only, then re-attempt your clone or pull command:

git config --global http.https://chipmaster2.qti.qualcomm.com.followRedirects "true"
git config --global http.https://qpm-git.qualcomm.com.followRedirects "true"

Then do this command to confirm it took...

git config --list

You should see these lines...

http.https://chipmaster2.qti.qualcomm.com.followredirects=true
http.https://qpm-git.qti.qualcomm.com.followredirects=true

RPC Failed; result=22, HTTP code = 403

This is related to - Fatal - Could not read Username

Follow instructions on that link to downgrade Windows Git to 1.8.4 to work around that 1.8.5 bug

RPC Failed; result=18, HTTP code = 200

This error has been reported when attempting to clone Distros with large content >1.2GB, but not for smaller Distros (<1GB).

When the error was seen, the text shows the following…

error: RPC failed; result=18, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: recursion detected in die handler

This has been reported by one customer so far, on one regional network only (and not on the customer’s other regional networks). Their network IT department was able to resolve the issue by changing a setting that forced their network to go to chipcode.qti.qualcomm.com by using a dedicated carrier network physical line. After that change was made, they tested cloning large Distros across 3 different computers (2 is Linux and 1 is Windows 7) and they were all able to git clone the large Distros successfully.

This is the error code coming from libcurl, the underlying library used in http communications with Git. From the libcurl documentation, a result code of 18 means:

CURLE_PARTIAL_FILE (18)
A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size.

While we have server site settings set appropriately for this option, you may need to adjust/override your client's settings. To do this, execute the following command(s):

From within a specific repository. Note the number at the end is the size, in bytes that you wish to allow in a single post. If you have much larger files, you may need to increase this number.

git config http.postBuffer 1048576000

To set this gloablly for all remote Git repositories you ever connect to

git config --global http.postBuffer 1048576000

RPC Failed; result=56, HTTP code = 0

Upgrade to the latest Git for Linux to resolve this error. If it continues, the specific 56 error typically relates to a buffer limit.

Try raising the buffer limit by entering:

git config --global http.postBuffer 1048576000 

RPC failed; result=22, HTTP code = 500

Upgrade to the latest Git for Linux to resolve this error. If it continues, the specific 56 error typically relates to a buffer limit.

Try raising the buffer limit by entering:

git config --global http.postBuffer 1048576000