eclipse Egit安装路径错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17776086/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Egit installation path error
提问by mike
Eclipse Kepler 4.3.0.v20130530-1801
Eclipse 开普勒 4.3.0.v20130530-1801
Egit version: 3.0.0.201306101825-r
Egit 版本:3.0.0.201306101825-r
After launching Eclipse and checking the Error Log I have the following warning:
启动 Eclipse 并检查错误日志后,我收到以下警告:
EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory. The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in this system level configuration. The Git installation location can be configured on the Team > Git > Configuration preference page's 'System Settings' tab. This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
EGit 无法检测到本机 Git 的安装路径“gitPrefix”。因此,EGit 不能遵守可能在本机 Git 安装目录下的 ${gitPrefix}/etc/gitconfig 中配置的系统级 Git 设置。这些设置中最重要的是 core.autocrlf。默认情况下,Git for Windows 在此系统级配置中将此参数设置为 true。可以在 Team > Git > Configuration 首选项页面的“系统设置”选项卡上配置 Git 安装位置。可以在 Team > Git > Confirmations and Warnings 首选项页面上关闭此警告。
So I need an entry in the file gitconfig for core.autocrlf ?
所以我需要在文件 gitconfig 中为 core.autocrlf 输入一个条目?
回答by VonC
This kind of warning message seems to be related to this Egit commit.
This postsuggests:
这种警告信息似乎与这个Egit commit 相关。
这篇文章建议:
Solution:
Go toWindow > Preferences > Team > Git > Configuration > System Settings
Tab
Click onBrowse
and find your git system installation.
Windows example:C:\Program Files (x86)\Git\etc\gitconfig
解决方法:
进入Window > Preferences > Team > Git > Configuration > System Settings
Tab
点击Browse
,找到你的 git 系统安装。
窗口示例:C:\Program Files (x86)\Git\etc\gitconfig
回答by GregM
I was getting the same Warning from Eclipse on an Android SDK installation in Windows 7. The solution for me was to download Git from git-scm.download/winand installing in the default "Program Files (x86)/Git" directory. You can then reference this directory by navigating within Eclipse to:
我在 Windows 7 中的 Android SDK 安装上收到了来自 Eclipse 的相同警告。我的解决方案是从git-scm.download/win下载 Git并安装在默认的“Program Files (x86)/Git”目录中。然后,您可以通过在 Eclipse 中导航到以下位置来引用此目录:
- Window -> Preferences
- Team -> Git -> Configuration
- Tab "System Settings"
- Location: C:\Program Files (x86)\Git\etc\gitconfig
- 窗口 -> 首选项
- 团队 -> Git -> 配置
- 标签“系统设置”
- 位置:C:\Program Files (x86)\Git\etc\gitconfig
Otherwise, you can ignore the Warning if you have no need for a Git installation.
否则,如果您不需要安装 Git,则可以忽略警告。