I can not git clone on mac

Ryosuke Hujisawa
Sep 5, 2018 · 1 min read

environment

- mac high sierra 10.13.6

I tried to use git and I got such an error.

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

But you already have xcode-select on terminal?

$ xcode-select — install
xcode-select: error: command line tools are already installed, use “Software Update” to install updates

I had to fix the pass.

Execute `xcode-select -p`. It should be as follows. I fix it because I have a wrong pass.

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

Execute the following command

sudo xcode-select -switch

The path should be correct. You should be able to use git.

$ xcode-select -p
/Library/Developer/CommandLineTools
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade