简体   繁体   English

INTELLIJ IDEA 错误:“无法启动 Git:/usr/bin/git 可能 Git 可执行文件的路径无效。修复它。” 如何修复?

[英]INTELLIJ IDEA ERROR: "Can't start Git: /usr/bin/git Probably the path to Git executable is not valid. Fix it." How to Fix it?

I updated my mac to macOS Mojave version 10.14, I already had Xcode installed in the previous OS version and now while I run intelliJ this error is thrown:-我将我的 mac 更新到 macOS Mojave 版本 10.14,我已经在以前的操作系统版本中安装了 Xcode,现在当我运行 intelliJ 时会抛出这个错误:-

Can't start Git: /usr/bin/git Probably the path to Git executable is not valid.无法启动 Git:/usr/bin/git 可能是 Git 可执行文件的路径无效。 Fix it修理它

Screenshot of the error错误截图

To solve this problem you need to install xcode developer tools.要解决此问题,您需要安装 xcode 开发人员工具。

Run this command, the problem will be fixed:运行此命令,问题将得到解决:

xcode-select --install

I had the same problem after upgrade and this solved it.升级后我遇到了同样的问题,这解决了它。

I performed the following steps to solve this problem:我执行了以下步骤来解决这个问题:

  1. Run sudo xcode-select --switch /Application/Xcode.app/Contents/Developer (this step may be optional)运行sudo xcode-select --switch /Application/Xcode.app/Contents/Developer (这一步可能是可选的)
  2. Open App Store打开应用商店
  3. Update xcode更新xcode
  4. Wait for update to complete before continuing with next steps在继续下一步之前等待更新完成
  5. Run sudo xcodebuild -license运行sudo xcodebuild -license
  6. Press enter key to view agreement (to page down the agreement hold space or press it multiple times)回车键查看协议(向下翻页协议保留空间或多次按下)
  7. Once at the end of the agreement if you agree type agree and press enter如果您同意,则在协议结束时输入agree并按Enter
  8. Close and re-open IntelliJ and GIT should work again.关闭并重新打开 IntelliJ 和 GIT 应该会再次工作。

I hope this helps others!我希望这可以帮助其他人!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM