Git error when installing brew on mac monterey (m1)

Issue

I’ve checked many many topics and tried many scripts without success.

After executing this

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

I get this error

==> Downloading and installing Homebrew... git: 'remote-https' is not a git command. See 'git --help'. Failed during: git fetch --force origin

I have no idea how to fix it. Worth mentioning that I can clone other repos, the git command works.

Any idea?

The user name and email are already configured on git, also the xcode tools. I deleted all the previous (failed) homebrew installations.

Solution

Apparently, the git version 2.38.0 has something broken.

I’ve updated the git using the mac ports and now it worked with version 2.38.1

Answered By – Berna

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published