1

I updated My macOS to Monterey. After that, magit command yields "Corrupt Git configuration". I uninstall emacs and magit and install them again, but it does not resolve. How do I fix that?

4
  • 1
    Does running git from the command line work? What about if you do M-x shell from Emacs and try to run git?
    – rpluim
    Nov 5 '21 at 17:05
  • I can resolve this. M-x shell and git yields ``` xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun ``` Then, I found the following. Installing xcode resolve this issue. apple.stackexchange.com/questions/254380/…
    – hrkshr
    Nov 5 '21 at 17:25
  • This is why I install git myself on macOS :-)
    – rpluim
    Nov 5 '21 at 17:33
  • You should go ahead and add that information as an answer to the question.
    – db48x
    Nov 5 '21 at 19:44
1

I can resolve this. M-x shell and git yields

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

Then, I found the following. Installing xcode can resolve this issue.

https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a

0

I had this issue as well. The answer by @hrkshr was helpful in finding a different solution for me.

I normally use git installed by homebrew. Homebrew's version doesn't have this issue: only Apple's git has this problem. E.g., if I do git --version from my shell, it works fine. But if I do /usr/bin/git --version, I get the error described.

So, my issue was that it was using the wrong git installation. I just had to switch it to the correct version by setting (setq magit-git-executable "/usr/local/bin/git") in my .emacs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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