xcrun: error: invalid active developer path

Recently (after updating my OSX to the Ventura 13.0.1), when I tried to clone a git repository I was presented with a bit of a cryptic message:

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

Turns out you need to reinstall your xcode tools, so just run

1xcode-select --install

In case that doesn’t work, try

1sudo xcode-select --reset
2sudo xcodebuild -license accept

Copyright

Comments