3

I am trying to install git using homebrew:

brew install git

Terminal reads:

==> Searching for similarly named formulae... Error: No similarly named formulae found. Error: No available formula or cask with the name "git". ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> Searching taps on GitHub... Error: No formulae found in taps.

If I input brew doctor, I get the following:

Warning: Suspicious https://github.com/Homebrew/homebrew-core git origin remote found. The current git origin is:
https://github.com/Homebrew/brew With a non-standard origin, Homebrew won't update properly. You can solve this by setting the origin remote: git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core

However, if i do git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core, nothing changes and I get the same output with brew doctor

command line tools is installed:

xcode-select --install

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

I have tried reinstalling brew, brew update and brew cleanup

Any help would be greatly appreciated.

3
  • Have you done brew up to update homebrew too?
    – jimtut
    Commented Jan 21, 2021 at 3:32
  • Yes, tried this - still getting the same brew doctor output unfortunately
    – Jonbri
    Commented Jan 21, 2021 at 13:03
  • Even I had the same problem, in fact I'm unable to install any package using brew. Are you able to?
    – Eeshaan
    Commented Jan 27, 2021 at 14:51

2 Answers 2

0

I don't know the problem with homebrew but there are other ways to load git. This link lists several ways to load git. If you've loaded the Xcode comand line tools git may already be installed. Type git --version to see if git is already installed. It was on my machine. The link also lists ways using MacPort.

2
  • Or just use the version Xcode provides
    – mmmmmm
    Commented Jan 20, 2021 at 17:17
  • Yes you're right - git was already installed. I used the installer from the link you posted to get a more recent version without using homebrew. Thanks for your help!
    – Jonbri
    Commented Jan 21, 2021 at 13:01
0

One workaround that works for me is running brew search {formula} before brew install {formula}.

In this case, run brew search git then brew install git.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .