准备:自己的github账号

1)打开Eclipse, 进入Window->preferences->network connection->ssh2。
2)选择 key managerment->genernate RSA keys->save private key->保存到文件中
3)登录自己的github账号,点击头像->settings->SSH Keys->add SSH Key, 将第2步生成的key(类似于ssh-rsa xxxxxxxxx RSA-1024)粘贴到key中,填入名称->add key.
4)回到Eclipse,点击General->Add private key-> 选择第二步保存的文件。
5)导入GIT项目。file->import->git->projects from git->clone URI->输入URI(类似于[email protected]:xxx/xx.git),协议选择SSH,确定即可
09-12 18:25