28.08.2019

Xcrun: Error: Invalid Active Developer Path

Xcrun: Error: Invalid Active Developer Path Rating: 4,4/5 5437 votes

Get an ad-free experience with special benefits, and directly support Reddit.

Xcrun:

Last night (November 2018) I updated to macOS Mojave,

This morning I navigated to my work's code base in Command line on my MacBook pro,

typed in 'git status' in the repo and received the error:

dustbuster
dustbusterdustbuster
13.3k3 gold badges6 silver badges23 bronze badges

12 Answers

The problem is that Xcode Command-line Tools needs to be updated.

Go back to your terminal and hit: Total war star wars mod.

You'll then receive:

And be prompted in a window to update Xcode Command Line tools.

After the update is completed, open a new terminal window and your development tools should be returned.

Addition: With any major or semi-major update you'll need to update the command line tools in order to get them functioning properly again. Check Xcode with any update. This goes beyond Mojave..

After that restart your terminal

Taimoor Changaiz
5,9381 gold badge36 silver badges44 bronze badges
dustbusterdustbuster
13.3k3 gold badges6 silver badges23 bronze badges

I got some errors that the software was unavailable from the update server when trying

xcode-select --install

What fixed it for me was going here https://developer.apple.com/download/more/ and downloading Command Line Tools (macOS 10.14) for Xcode 10 and then installing it manually.

After that, the errors should be gone when you open up a new terminal.

deefdeef

For me xcode-select --reset was the solution on Mojave.

H6.H6.
19.9k11 gold badges61 silver badges69 bronze badges

In addition to dustbuster's answer I needed to set path to the Xcode folder with this command:

Patrik NeperfektaPatrik Neperfekta

For me what worked is the following:

Then like in @High6's answer:

This will reveal a license which I assume is some Xcode license. Scroll to the bottom using space (or the mouse) then tap agree.

This is what worked for me on MacOS Mojave v 10.14.

J P
2,7772 gold badges23 silver badges34 bronze badges
briankipbriankip

I figured out the Xcode Command Line Tools part from the error message, but after running Xcode and getting the prompt to install the additional tools it did claim to install them, but still I got the same error after opening a new terminal.

So I did the xcode-select --install manually and after that it worked for me.

Cœur
21.3k10 gold badges121 silver badges168 bronze badges
P. HurmeP. Hurme

For me, I didn't have xcode installed (on Mojave OS). I went to the App Store on my mac and downloaded it, then went back to terminal and typed git and hit enter, then it worked.

kiko carissekiko carisse

I found that my version of Xcode was too outdated and installing command-line-tools wasn't helping. Here's what I did:

  • I completely uninstalled the outdated XCode
  • I reinstalled the most recent XCode from the app store
  • That was all. Git was restored.

Hope this helps someone else..

Caleb MbakweCaleb Mbakwe
DanielDaniel

if you dont have xcode or setup manually without xcode.

  1. sudo rm -rf /Library/Developer/CommandLineTools
  2. https://developer.apple.com/download/more/ and downloading Command Line Tools (macOS 10.14) for Xcode 10 and then installing it manually.
  3. Setup Command Line Tools

Take it be easy

else

  1. xcode-select --install . enough this.
Armali
8,33512 gold badges39 silver badges108 bronze badges
Ali ÖzyıldırımAli Özyıldırım
Pikachu the Parenthesis Wizard
2,1688 gold badges17 silver badges29 bronze badges
Ehsan BarkhordarEhsan Barkhordar

in my case it wasn't checked in xcode

you can do that as following :xcode -> Preferences and tap Locations then select , as the followng image

tahataha

Not the answer you're looking for? Browse other questions tagged xcodegitmacoscommand-lineterminal or ask your own question.

Join GitHub today

GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.

Sign up New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments

commented Aug 18, 2017

Xcrun: Error: Invalid Active Developer Path
  • GitLens Version:
  • VSCode Version:
  • OS Version:

Steps to Reproduce:

commented Aug 18, 2017

@tiendzbk I'd be happy to help you but I'm going to need more information from you. Can you please provide the information asked for in the issue template (GitLens version, vscode, os, etc). Also have you followed the steps in the error message? I'm assuming git is installed? If so, is it in your PATH? If not, where is it installed? Have you tried setting the 'gitlens.advanced.git'='<put your git file path here>'?

Let me know and I'd be glad to help.

Xcrun Error Invalid Active Developer Path Mojave

added the status: needs more info label Aug 18, 2017

commented Sep 12, 2017

This hasn't been updated in almost a month -- please re-open if there is still an issue I can help with

commented Sep 21, 2017

I'm having the same issue just after update the lastest xcode.

  • MacOS High Sierra (GM)
  • Xcode Version 9.0 (9A235)
  • VSCode 1.16.1

fix issue
$ git -v
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
$ sudo xcodebuild -license

commented Nov 17, 2017
edited

Try running this from Terminal. Worked for me.
xcode-select --install
You may have to restart vscode afterwards.

commented Nov 27, 2017
edited

Mojave Missing Xcrun At: /library/developer/commandlinetools/usr/bin/xcrun

Just downloaded 1.18.1. The 'GitLens unable to find Git' error is appearing. It appeared on 1.18.0 also, but never appeared on 1.17.1. I'm running the portable version as I do not admin rights to install on my Windows 10 machine. Note, No error appearing on my Mac(1.18.1) where I could install. Therefore, I am currently using the 1.17.1 version until this is fixed.

UPDATE: when I asked for the path in the command window, the path to GIT was displayed. Yet, VS Code did not recognize it in the terminal window. When I added it to the path, at the end of the users path, the GitLens error message did not display. Why are the paths different?

commented May 4, 2018
edited

Can confirm I had this issue once I upgraded from sierra to high seirra.

Tried to find git and got this error:

had to reinstall xcode-select --install

Looks like it doesn't reinstall xcode when you upgrade but weirdly git was present so I didn't have in to install that.

Props goes to @shlgug

Missing

added a commit to tmobile/vscode-gitlens-enhanced that referenced this issue Mar 2, 2019

Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23Learn about signing commits
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment