Terminal (Mac)

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

What it means
After a macOS update, your Mac needs you to reinstall or accept the Apple Command Line Developer Tools so Git can work.
Likely causes
  • A recent macOS update cleared the Command Line Tools link.
  • The ”Install Command Line Developer Tools” window on Mac hasn't been completed yet.
Prevention
If Git stops working right after a macOS update, run git --version once to trigger the Apple installer.

Copy for your agent

My Mac shows `xcrun: error: invalid active developer path`. Run `xcode-select --install` and wait while I click Install in the macOS window.

Full help article“Command not found” after installing a tool

Last reviewed Nov 8, 2026