git clone error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054

211,009

Solution 1

I resolved the same problem by this:

git config http.postBuffer 524288000

It might be because of the large size of repository and default buffer size of git so by doing above(on git bash), git buffer size will get increase.

Cheers!

Solution 2

I had the same issue, and I have solved it by changing my net connection. In fact, my last internet connection was too slow (45 kbit/s). So you should try again with a faster net connection.

Solution 3

I had the same problem, and @ingyhere 's answer solved my problem .
follow his instructions told in his answer here.

git config --global core.compression 0
git clone --depth 1 <repo_URI>
# cd to your newly created directory
git fetch --unshallow 
git pull --all

Solution 4

you need to increase the buffer size (it's due to the large repository size), so you have to increase it

git config http.postBuffer 524288000

Althought you must have an initializd repository, just porceed as the following

git init
git config http.postBuffer 524288000
git remote add origin <REPO URL>
git pull origin master
...

Solution 5

git config --global http.postBuffer 524288000

Work in my case - AWS code commit

Share:
211,009

Related videos on Youtube

user8612746
Author by

user8612746

Updated on March 02, 2022

Comments

  • user8612746
    user8612746 10 months

    I'm having trouble cloning a repo on git. I've been trying for to days and have tried quite a few solutions (in most the problem was slightly different but seemed to apply) but nothing has done anything to make a difference.

    I've tried switching off the anti-virus and firewall but that didn't help. I've also tried uninstalling and reinstalling the network adapter drivers (and restarting the computer) and that didn't work.

    From what I understand it's a network issue somewhere as the remote server keeps hanging up but I'm not managing to get anywhere with the issue.

    Using git clone -v --progress seemed to give the same output as git clone. Output from git clone -v --progress https://github.com/mit-cml/appinventor-sources.git

    Cloning into 'appinventor-sources'...
    POST git-upload-pack (gzip 1425 to 774 bytes)
    remote: Counting objects: 41649, done.
    remote: Compressing objects: 100% (7/7), done.
    error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed

    I've now tried increasing the buffer again

    git config --global http.postBuffer 1048576000

    but still nothing.

    I'm following the solution from The remote end hung up unexpectedly while git cloning for troubleshooting.

    • Christoph Böhmwalder over 5 years
      Several other solutions sugggest increasing your push buffer size, have you tried that? In general, can you rule out the solutions you've already tried?
    • user8612746
      user8612746 over 5 years
      My brain's a bit frazzled so I can only remember those. Think I may have tried 2 or 3 more, if I think of them I'll add them. For now I'll try buffer size, thanks.
    • user8612746
      user8612746 over 5 years
      I increased buffer size git config --global http.postBuffer 524288000, no change. Is 500M okay?
    • user8612746
      user8612746 over 5 years
      I saw a solution which mentioned a hotfix support.microsoft.com/en-us/help/981344/…. I haven't applied the fix but I'm guessing if that was the problem turning off the anti-virus and firewall would have worked too
    • user8612746
      user8612746 over 5 years
      One thing I considered is that SSL is not the latest version. I'm using Git for Windows which has OpenSSL 1.0.2l. This is the previous version. Would that make a difference?
    • user8612746
      user8612746 over 5 years
      I solved it with the solution here stackoverflow.com/questions/21277806/… by doing fetch with incrementally bigger depth. It didn't work with 1000 though. Wrote a script with depth increment of 10. I didn't try an ssh clone.
    • Saad Anees
      Saad Anees over 3 years
      nothing helped me in this post. i had to create new repo instead and used git bash to push
  • rob_james
    rob_james over 4 years
    This seemed like the simplest fix for me to try first... Surprisingly, switching from wifi to ethernet did indeed solve this for me too.
  • Maxim Mandrik
    Maxim Mandrik over 3 years
    Not. Upgrading from git version 2.18 to 2.21.0 did not solve the problem!
  • Maxim Mandrik
    Maxim Mandrik over 3 years
    Not. Turning off the firewall did not help.
  • csharpforevermore
    csharpforevermore over 3 years
    Use the command line: git config http.sslVerify false (see stackoverflow.com/questions/11621768/…)
  • Piotr Badura
    Piotr Badura over 3 years
    You have to check your pod file, because your dependency can be fetched from internal repo. Sometimes this error is caused by proxy or vpn
  • Barry over 3 years
    wow. Guess there's a first time for everything. Never thought I'd see a repo too large to manage. Do you know if this needs to be managed in some way? I would imagine this would continue to happen the larger it grows right
  • 风声猎猎 over 3 years
    Use git init before git config http.postBuffer 524288000
  • Fernando JS about 3 years
    Another option is a global configuration: git config --global http.postBuffer 524288000
  • raquelhortab
    raquelhortab about 3 years
    If I do it this way git does not find my branch when I try checking it out...
  • Shahryar Saljoughi
    Shahryar Saljoughi about 3 years
    I've no idea about it. let me know if you found the reason by posting as answer or just leaving a comment. thanks.
  • raquelhortab
    raquelhortab about 3 years
    I ended up doing it as I already was, I just had to try it like 10 times till it worked... Not sure why
  • Leojet almost 3 years
    Yup can confirm, I had to retry like 10 times and suddenly I could clone the repo...
  • imdadhusen
    imdadhusen over 2 years
    This was worked for me but during following the steps i was getting error....i tried 2-3 times and finally able to finish the steps to complete...+1
  • soni kumari
    soni kumari about 2 years
    switching to a better network connection did help me. Thanks a lot :)
  • Aditya Sinha
    Aditya Sinha about 2 years
    I actually used this command -- git config http.sslVerify false and then I did -- git config http.sslVerify true Then it worked!
  • Niraj
    Niraj about 2 years
    Using this command in terminal giving me error fatal: not in a git directory
  • bk2204
    bk2204 almost 2 years
    Note that the Git FAQ explains that this is almost always due to broken software, like a proxy, antivirus, firewall, or TLS MITM device, and that software should be fixed or replaced rather than being worked around. It also has no effect on clones or fetches or SSH, only on pushes over HTTP(S).
  • Santhosh Ramini
    Santhosh Ramini almost 2 years
    @Niraj you need to run git init first
  • Smaillns
    Smaillns over 1 year
    @HosseinKurd try again ;)
  • Varadharajan over 1 year
    This is the best solution :) Worked like a charm
  • Stefano Sansone over 1 year
    This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
  • minitechi
    minitechi 11 months
    Switching to a better network connection worked for me too. Thanks. :)
  • JayB 11 months
    This helped.Thanks.
  • Admin
    Admin 11 months
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
  • Sithu
    Sithu 8 months
    This worked with git config http.sslVerify "false"