2012年12月21日金曜日

EGit could not detect where Git is installed

標題のエラーが出た。

Eclipseを起動すると、標題の文言のタイトルの警告が出る。その内容は次のとおりである。
EGit does not require Git to function,but there may be important
settings in the installation directory that EGit needs to know
about in order to be compatible with Git.The most important of
these settings is core.autocrlf.Git for Windows by default
sets this parameter to true in the etc directory of the Git
installation.
The directory can be configured in Preference under Team > Git.

上記英語の文は、次のサイトからコピペしたものである。
知恵袋

stackoverflowでも同様の質問があるが、回答は「次のサイトを読めば良い」ということだそうである。
Pointing out the System wide configuration

読んだ結果、次のとおりすれば良いということである。
Eclipse:Window>Preferences>Team>Git>Configuration>System Settings
「Location」欄が「Unknown」になっているはずである。ここに
「C:\Program Files (x86)\Git\」
を入力する。すると、自動的に
「C:\Program Files (x86)\Git\etc\gitconfig」
に設定され、KeyやValueにも値が設定される。

なお、事前にGitを
「C:\Program Files (x86)\Git\」
にインストールしておかねばならない。

Gitのダウンロード&インストールについては次のサイトに書かれてある。
Git入門

次のサイトからダウンロードするのである。
msysgit

また、「HOME」という名称の環境変数を、Windowsに設定しておかねばならない。変数値は「C:\Program Files (x86)\」にしておけば良いのかもしれない。

開発環境:Windows
Eclipse:Juno

0 件のコメント:

コメントを投稿