3

IntelliJ中Git突然不能用,报错 xcrun: error: invalid active developer path (/Libr...

 3 years ago
source link: http://blog.didispace.com/macos-update-intellij-git-error/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

IntelliJ中Git突然不能用,报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

记录一个昨天碰到的问题以及解决方法,希望对碰到一样问题的你有用!

昨天升级了一下Mac OS,重启后再打开IntelliJ,突然Git就不能用了,报了下面这样的错:

upload successful
upload successful

开始以为是不是Git出了问题,打开终端试了一下git命令,是一切正常的,排除git客户端的损坏。

upload successful
upload successful

再仔细看错误原因,推测可能是路径配置问题,打开IntelliJ的菜单:Preferences...

在左侧搜索框中直接搜索git或者直接找到Version Control菜单项,点击下属的Git功能项,此时可以看到当前的Git命令路径配置如下图:

upload successful
upload successful

问题就出在这里,将该路径修改为:

/usr/local/bin/git

pasted-267.png

点击右侧的Test按钮,测试一下,可以看到如下图所示的结果:

pasted-268.png

完成之后,记得点击ApplyOk按钮,然后关闭设置窗口之后,Git就可以正常使用了!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK