您的位置:首页 > 编程语言 > Java开发

myeclipse10运用git过程

2016-06-23 20:48 405 查看
myeclipse10运用git过程

1.下载githttps://git-scm.com/download/

2.在myeclipse中安装EGit插件:

–先查找对应的版本:Myeclipse|Help|MyEclipse Configuration Center:查看myeclipse所以依赖的eclipse版本号

–对应到http://www.eclipse.org/egit/download/Eclipse 查找对应版本的EGit插件下载EGit,或者到Myeclipse|Help|MarketPlace|search:EGit下载安装

3.下载好EGit后将Egit中的plugin和features文件夹复制到myeclipse10的安装目录下的dropins文件夹中,重启myeclipse;

或者建立连接将文件链接到dropins文件夹下:随意新建一个文件夹,比如:D:/Myplugins/EGit,将Egit中的plugin和features文件夹复制此文件夹下,同时在myeclipse10的安装目录下的dropins文件夹中新建链接文件:EGit.link:写入:path=D:\MyPlugins\EGit,重启myeclipse

4.配置SSH链接github

–打开gitbash:

$ git config --global user.name “your_username”  #设置用户名
$ git config --global user.email “your_registered_github_Email”  #设置邮箱地址(建议用注册giuhub的邮箱)


–、生成SSH密钥过程:

1.查看是否已经有了ssh密钥:
cd ~/.ssh


如果没有密钥则不会有此文件夹,有则备份删除

2.生存密钥:

$ ssh-keygen -t rsa -C “test@gmail.com”


按3个回车,密码为空:

Your identification has been saved in /home/tekkub/.ssh/id_rsa.

Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.

The key fingerprint is:

………………

最后得到了两个文件:id_rsa和id_rsa.pub

3.添加密钥到ssh:ssh-add 文件名

需要之前输入密码。

4.在github上添加ssh密钥,这要添加的是“id_rsa.pub”里面的公钥。

打开https://github.com/ ,登陆,然后添加ssh。

5.测试:ssh git@github.com
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息