IntelliJ中Git突然不能用,报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
2023-09-11 14:17:24 时间
记录一个昨天碰到的问题以及解决方法,希望对碰到一样问题的你有用!
昨天升级了一下Mac OS,重启后再打开IntelliJ,突然Git就不能用了,报了下面这样的错:
开始以为是不是Git出了问题,打开终端试了一下git
命令,是一切正常的,排除git
客户端的损坏。
再仔细看错误原因,推测可能是路径配置问题,打开IntelliJ的菜单:Preferences...
。
在左侧搜索框中直接搜索git
或者直接找到Version Control
菜单项,点击下属的Git
功能项,此时可以看到当前的Git命令路径配置如下图:
问题就出在这里,将该路径修改为:
/usr/local/bin/git
点击右侧的Test
按钮,测试一下,可以看到如下图所示的结果:
完成之后,记得点击Apply
和Ok
按钮,然后关闭设置窗口之后,Git就可以正常使用了!
欢迎关注我的公众号:程序猿DD,获得独家整理的学习资源和日常干货推送。如果您对我的专题内容感兴趣,也可以关注我的博客:didispace.com
相关文章
- 在Visual Studio 中使用git——什么是Git(一)
- Git学习环境搭建和git对用户的增删改查命令
- kentico在使用局域网ip访问的时候提示Missing license或者Invalid website
- 微信小程序 - [警告] Setting data field “xxxx“ to undefined is invalid. 解决方案
- ERROR ITMS-90717: “Invalid App Store Icon. The App Store Icon in the asset catalog in ‘HBuilder.app‘
- mysql报错ERROR 1356 (HY000): View ‘mysql.user‘ references invalid table(s) or column(s) or function(s)
- kafka消费者报错INVALID_FETCH_SESSION_EPOCH
- Uncaught Invalid geoJson format TypeError Cannot read properties of undefined (reading ‘length‘)
- 华为IAP购买token校验报错{responseCode8,responseMessageERROR_INVALID_PAYMENTTOKEN}
- 微信上传图文消息invalid media_id hint,thumb_media_id怎么获取
- Mybatis出错: Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class com.cyf.pojo.User with invalid types () or values ()
- aes 解密出现 java.lang.NumberFormatException: Invalid int: "ch"
- MSB6001:Invalid command line switch for CL.exe
- 【Git】gitblit搭建git服务器-开机自启-Mac版
- 【Git 问题及解决方案】fatal: unable to access ‘https://github.com/xxx/yyy.git/‘: OpenSSL SSL_read: Con
- 【GIT】git中文文件名显示异常问题
- ssm 出现 Method threw 'org.apache.ibatis.binding.BindingException' exception.Invalid bound statement (not found)……
- Mybatis中Date类型筛选查询报错:invalid comparison: java.time.LocalDateTime and java.lang.String
- java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986