Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

homebrew install error Failed during: git fetch origin master:refs/remotes/origin/master --tags --force

I couldn't install homebrew.

Methods I tried:

  1. change http_proxy value `export http_proxy=http://127.0.0.1:10818;export https_proxy=http://127.0.0.1:10818;
  2. raise postBuffer value git config --global http.postBuffer 5242880000
  3. change script using ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" instead of /usr/bin/ruby -e "$(curl -fsSL... It worked. Can anyone possibly explain why it works? Thanks

Terminal keeps showing this message

==> Downloading and installing Homebrew...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (16/16), done.
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force
like image 498
KailiC Avatar asked Feb 05 '20 04:02

KailiC


1 Answers

I ran into the same problem and I think we have the same issue and it always breaks when I reached installing homebrew/core:

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno
54 fatal: the remote end hung up unexpectedly fatal: early EOF fatal:
index-pack failed Failed during: git fetch --force origin
refs/heads/master:refs/remotes/origin/master

I used these resources to solve the problem Homebrew install: Failed during: git fetch origin master:refs/remotes/origin/master -n --depth=1

https://www.programmersought.com/article/74365494100/

my steps:

  1. I deleted all the folders related to Homebrew, you find them at start of install run: (put in script and run as you might need to do more than once, like me :/) ==> This script will install:

    /usr/local/bin/brew /usr/local/share/doc/homebrew /usr/local/share/man/man1/brew.1 /usr/local/share/zsh/site-functions/_brew /usr/local/etc/bash_completion.d/brew /usr/local/Homebrew

  2. I ensured all network connection is ok and I can ping github.com

  3. I ensured my email is assigned to account on github

    git config --global user.email [email protected]

  4. as you did increase the post buffer value

    git config --global http.postBuffer 5242880000

  5. modify the security setting on ssl transfer

    git config --globle http.sslVerify "false"

Then it all worked and started to download well. I did not break but it was taking a very long time... I remember leaving my MacBook Pro and coming back after a long time and it was still transferring in...I hope I was able to help.

It took me a whole day to solve it but the two links have all the details if you need more help.

like image 98
Ahmad Al-Baqawi Avatar answered Oct 08 '22 17:10

Ahmad Al-Baqawi