Git clone return result=18 code=200 on a specific repository
I’m trying to clone a internal repository from our company repository, and I keep getting this error:
error: RPC failed; result=18, HTTP code = 200
It always happens only after the repository have been completely downloaded (It takes a while).
- git multiple user names for the different projects within the same system
- Domain name change on Git Server
- How to configure unified diff context via git-config?
- git rebase could not execute editor
- How does `receive.denyCurrentBranch=updateInstead` interact with the Index?
- Platform-specific git configuration files
I’ve tried using torotiseGit. Here is the report:
git.exe clone --progress -v "http://path/repository.git" "C:\Users\user\Documents\code\repository" Cloning into 'C:\Users\user\Documents\code\repository'... POST git-upload-pack (424 bytes) remote: Compressing objects: 100% (4895/4895) Receiving objects: 100% (6970/6970), 61.89 MiB | 4.82 MiB/s Resolving deltas: 100% (2610/2610) Resolving deltas: 100% (2610/2610), done. remote: Total 6970 (delta 2610), reused 5702 (delta 1672) error: RPC failed; result=18, HTTP code = 200 git did not exit cleanly (exit code 128)
I’ve tried several times, from a Linux machine and from a windows machine. Same error
How can i further investigate the error?
I couldn’t find any useful information on Google
EDIT: I’ve checked the Apache logs on the Git server – There is a GET and a POST (with result 200) corresponding to each clone. The POST is a bit big (60MB) – So I’ve tried increasing the postBuffer to 500MB, but the error still occurs
Could this really be a git bug?
I wish it gave more informative errors…
2 Solutions collect form web for “Git clone return result=18 code=200 on a specific repository”
The error: RPC failed; result=18, HTTP code = 200 is a libcurl error.
From http://curl.haxx.se/libcurl/c/libcurl-errors.html we can see this is:
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.
You can set GIT_CURL_VERBOSE=1 before running a command like clone to understand how libcurl is failing. This might be done in bash with:
GIT_CURL_VERBOSE=1 git clone --progress -v ...
However given the error above you should try adjusting http.postBuffer. Try:
git config --global http.postBuffer 524288000
I had same problem on Windows machines (cant pull or clone remote repo) while working with git remote server over http (not https) – solution I found to this problem:
On desktop machine (where error occurred) reason for this was an antivirus software (Kaspersky Internet Security 2013 in my case) so I put into exceptions the following git components:
- C:\Program Files (x86)\Git\bin\git.exe | all
- C:\Program Files (x86)\Git\bin\curl.exe |all
- C:\Program Files (x86)\Git* |all
- C:\Program Files (x86)\Git\git-cheetah* |all
- C:\Program Files (x86)\Git\bin\git.exe
- C:\Program Files (x86)\Git\bin\curl.exe
- C:\Program Files (x86)\Git\bin\sh.exe
- c:\program files (x86)\git\libexec\git-core\git-remote-http.exe
- c:\program files (x86)\git\libexec\git-core\git-upload-pack.exe
and tick all options to not interrupt them at all (no tracing of workflow and network activity) – after that the problem was gone away