eclipse 集成 github
1.eclipse markketplace 搜索 egit 安装


next next ........ 安装好之后restart
2.开始配置git插件
配置git有2中方式
1.使用https协议
2.使用ssh远程协议
使用https协议
建立好项目后
点击项目右键-team-share project
选择git
首先需要创建个本地git仓库

创建好了之后 ,先把项目提交到本地仓库中 team-commit
接下来要提交到github远程仓库
team-remoto-push

在弹窗框中填如远程仓库的https协议地址 https地址可以从github上获取:


接下来,需要选择 发布到远程的仓库的项目

填好本地仓库对应远程仓库的git项目 ,add spec - 勾上force update-next
这里要求输入用户密码

next - finsh -会提交到github远程仓库

OK,提交成功
使用ssh远程协议
生成 ssh2 rsa key


点击Explort Via SFTP 输入git@github.com 点击OK
若出现:Failed to export ssh key to remote server的警告,不需理会
点击 Load Existing Key 选择私钥 点击Apply 即可 (若不执行这一步会在上传代码的时候出现:git@github.com:xxx/xxx.git: Auth fail 的错误)
3.github web设置
settings

deploy keys - add deploy key

把刚才生成的key copy进去 ,点击add key
可以看到ssh地址了

其他操作与http操作大同小异
3.github仓库的提交与拉取
提交
修改完之后需要commit。这只是提交到了本地仓库,让后push提交到远程仓库
服务器修改好之后,本地可以直接pull下来
需要注意的是,结构的对应,本地与服务器的结构要对应
posted on 2017-03-21 17:18 signheart 阅读(1695) 评论(0) 编辑 收藏 举报