本来用着电脑上的IntelliJ IDEA 上git用的好好的,闲来无事升级了一下系统,结束发现git不能用了。
两步解决
1.安装xcode
2.IntelliJ IDEA 并配置git,Test 不通过重启idea
如果还是不好使,那就重新安装一下git,再配置一下idea的git
报错内容
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
查询通用的做法是在terminal 执行:
xcode-select --install
安装完成之后在终端上再运行git命令,就不会出现错误。
打开你的idea再设置一下你的git配置
which git可以查找安装路径
如果你在终端使用命令正常,这里路径也正确,Test不通过,重启你的IntelliJ IDEA,然后再来Test就可以通过了
由于macOS 升级,打开ieda 还是报错,上面的解决办法还是不行
报错:
下午3:57 Сannot Run Git
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
就去git官网下载git https://git-scm.com/download/mac
在手动安装git
再在idea中配置git的地址:
/usr/bin/git