KailiC
KailiC

Reputation: 121

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

Upvotes: 6

Views: 11239

Answers (4)

Trenskow
Trenskow

Reputation: 3793

My issue was that I am in Europe and the France node of GitHub was incredibly slow. I connected using VPN to US, and then it finished in a couple of seconds.

Upvotes: 0

Ahmad Al-Baqawi
Ahmad Al-Baqawi

Reputation: 209

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

Upvotes: 3

iChr0niX
iChr0niX

Reputation: 11

I was messing for hours with this and tried all mentioned fixes here and on a few other sites.

This was a simple case of turning on a VPN

Upvotes: 1

Chukwunazaekpere
Chukwunazaekpere

Reputation: 1012

in ubuntu 20.04, go to your file-menu, select "other locations", select "computer", select the "home" folder. right-click and "open in terminal".

enter "sudo rm -rf linuxbrew". try the installation again. If errors still pop out, enter "git config --global user.email '<your git email'" now try the installation again.

Upvotes: 0

Related Questions