【问题标题】:Cannot Run Git: IntelliJ IDEA, macOS无法运行 Git:IntelliJ IDEA、macOS
【发布时间】:2025-12-04 20:45:02
【问题描述】:

安装最新的 IntelliJ IDEA 后,我出现了 git 版本控制的问题。因为我的 mac book pro 中有 git 版本 2.17.2 (Apple Git-113)。我没有获得 Mac OS 的下一次更新,我通过 homebrew 安装了最新的 git 版本并授予它 777 权限。我在 IDEA 设置中添加了新的 git 路径,但 IDEA 说无法启动,权限被拒绝。

有人知道如何解决这个问题吗?

IntelliJ IDEA 2019.2 (Ultimate Edition)
Build #IU-192.5728.98, built on July 23, 2019
Runtime version: 11.0.3+12-b304.10 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
GC: ParNew, ConcurrentMarkSweep
Memory: 725M
Cores: 4
Registry: git.explicit.commit.renames.prohibit.multiple.calls=false
Non-Bundled Plugins: org.jetbrains.plugins.hocon, org.intellij.scala

编辑 - 感谢@JB Nizet 的帮助。我在路径末尾添加了“git”,它可以工作

/usr/local/Cellar/git/2.22.0_1/bin/git

【问题讨论】:

  • 错误信息告诉你出了什么问题。它尝试启动程序.../bin。它需要启动程序.../bin/git。需要提供git程序的路径,包括文件名:.../bin/git

标签: git macos intellij-idea


【解决方案1】:

请在Preferences | 下定义“git”二进制文件版本控制 | Git > Git eecutable 的路径 像这样:

【讨论】: