eclipse的egit插件包 点击打开链接
将下载的插件包解压放入eclipse安装目录中dropins目录中
重启eclipse
进入eclipse后依次点击windows-->Preferences-->Team-->Git-->Configuration-->User settings-->Add Entry...中添加name和email
依次点击windows-->Preferences-->General-->Network Connections-->ssh2-->Key Management-->Generate RSA Key
得到公钥和私钥,点击Save private Key..保存私钥
到github中点击右上角+选择New repository,输入Repository name后创建repository
点击右上角选择Settings-->SSH and GPG keys-->new SSH Keys
输入标题(随意),和之前eclipse中的公钥,当时如果没复制则去C盘用户下.ssh文件夹下的id_rsa.pub文件中查看
添加完公钥回到eclispe。
先将项目上传到本地仓库。项目右键选择Team-->Share Project-->git
勾选Use or create repository in parent folder of project
点击Create Repository
后勾选项目
项目右键选择Team-->commit提交到本地仓库
下面开始远成仓库链接
之前在这块卡住了很久,总是报
ssh://git@github.com:22: org.eclipse.jgit.transport.CredentialItem$YesNoType:
The authenticity of host 'github.com' can't be established.
RSA key fingerprint is 16:27:ac:a5:xx:xx:xx:xx:xx:xx:a6:48.
Are you sure you want to continue connecting?
这个纠结了一下午,后来在找到答案
点击window-->show view-->other-->Git Repositories
在Remotes中右键选择Create Remotes
一直OKOK
然后在项目右键选择Team-->remto-->push
不出现之前的错误了,等待一会就传上去了
暂时先写这么多,就是个记录,以后继续补充