1,介绍:
???????文章简述,git通过ssh秘钥方式与github建立链接,达到可通过ssh链接下载文件,然后git也可直接对文件进行修改提交
1.1,操作配置:
步骤一、生成秘钥 鼠标右键打开gitbase  全局配置变量
git config --global user.name "用户名" #自己的用户名
git config --global user.email "邮箱" #自己邮箱去
 生成秘钥ssh key(弹出的会话不用管直接按enter键继续) ssh-keygen -t rsa -C "邮箱"  生成秘钥之后 到~/.ssh/ cd ~/.ssh/  看看 有灭有id_rsa.put文件 ll  如果有则查看该文件内容 cat id_rsa.pub  将内容复制出来粘贴到github》setting》SSH and GPG keys 点击New SSH key  步骤二、下拉项目 前提:git上必须有项目,我原本git上就是有项目的所以我直接在项目上找ssh的链接进行拉取就行了,如果ssh秘钥配置生效,是可以用ssh进行拉取的,否则就是https模式去拉取  git clone git@github.com:jiangyuwoaini/microservicecloud-config.git  这是我荡下来的项目,成功了,这说明我本地的git已经与github建立了连接了  步骤三、git的常规操作 
2、总结:
???????现在无论是eclipse,还是idea异或是其他开发工具,都有较好的对git进行集成,什么拉取,更新,提交,推送命令啊,都能用图形化界面去操作,甚至连ssh链接也有https去代替,虽然已经非常方便了,但是程序员还是要了解一下其操作命令,以备后用,说不定以后看源码的时候用的上呢?
|