Trouble installing Git on Macbook

I am having some trouble setting up Git on my Macbook. When I open the Terminal and type in git, I get the following message:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

After a quick Google search, I found that many people had success by writing:

xcode-select --install

I get a message that asks me if I would like to install the Command Line Developer Tools, so I select install and agree to the terms. However, I then get a message that says:

“Can’t install the software because it is not currently available from the Software Update server.”

So after another Google search, I tried writing:

sudo xcode-select --reset

I enter my password, and then select enter, and nothing visibly changes. So I try writing git, and then xcode-select --install again, and the same thing keeps happening over and over in a circle.

I don’t know what to do!

Welcome to the forums!
Ugh, I can understand your frustration. I’m not entirely sure how to resolve this, but, maybe this would help?

https://blog.pcrisk.com/mac/12915-how-to-open-applications-created-by-unidentified-developer

Though, that’s an older article assuming one has Sierra.

What’s your OS? Catalina?

I also found this:

1 Like

With similar searches the folks who still couldn’t get things to work all seemed to wind up downloading the xcode dev tools as a .dmg and using the installer.
Given address was https://developer.apple.com/download/more/ but that may be outdated so have a little look around yourself.

I get the impression it’s something to do with a disjoint between the os and the xcode version but that’s a guess. Either way double checking both of these are updated isn’t a bad shout.

1 Like