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

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…

  • At what point will .gitattribute eol settings be run?
  • Can I reference the git repo from a repo-level .gitconfig file for a custom binary-file diff handler?
  • How can I tell Git to ignore certain branches when fetching/pulling?
  • Github SSH works but clone using ssh fails
  • Git alias to add prefix to name of new branch
  • GitConfig: bad config for shell command
  • Configure a local branch for push to specific branch
  • Git listing non-existent remotes
  • 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:

    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.

    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
    

    From here https://www.kernel.org/pub/software/scm/git/docs/git-config.html

    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:

    Exception Rules:

    • 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

    Trusted software:

    • 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

    Git Baby is a git and github fan, let's start git clone.