1.参考http://help.github.com/linux-set-up-git/设置git
先使用一次ssh,可自动生成.ssh目录
cd ~/.ssh
ssh-keygen -t rsa -C "your_email@youremail.com"
Add your SSH key to GitHub.
On the GitHub site Click “Account Settings” > Click “SSH Public Keys” > Click “Add another public key”
(1)Open the id_rsa.pub file with a text editor (Notepad, TextEdit, or gedit will do just fine). This is your public SSH key. You may need turn on “view hidden files” to find it because the.ssh directory is hidden. It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace. Now paste it into the “Key” field.
Test everything out.
To make sure everything is working you’ll now SSH to GitHub. Don’t change the “git@github.com” part. That’s supposed to be there.
$ ssh -T git@github.com
其中,ssh-key生成后执行 ssh-add ~/.ssh/id_rsa
2.新建项目创建源
3.添加远端地址
eclipse->window->Prefereces->General->Network->SSH2
Key Management->Load key
(连接超时)现可用https://account@github.com/account/project.git 输入注册用户名和密码 成功
Git Repositories -> config remote
现在,配置结束。