Git sourceTree的使用

一、注册github 账号:注册地址:https://github.com/join?source=header-home

    

      填写,用户名,密码,邮箱地址,然后点击 “Create an account” 按钮点击创建,第二步,第三步,跳过

二 、下载git  

     输入地址:https://git-scm.com/download/  就会自动下载 git.exe 文件,选择默认安装即可

设置Git的user name和email:

$ git config --global user.name "xuhaiyan"
$ git config --global user.email "[email protected]"
<span style="margin: 0px; padding: 0px; font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;">生成SSH密钥过程:</span><br style="font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;" /><span style="margin: 0px; padding: 0px; font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;">1.查看是否已经有了ssh密钥:cd ~/.ssh</span><br style="font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;" /><span style="margin: 0px; padding: 0px; font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;">如果没有密钥则不会有此文件夹,有则备份删除</span><br style="font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;" /><span style="margin: 0px; padding: 0px; font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;">2.生存密钥:</span><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;"></span><blockquote style="font-size: 14px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif; line-height: 1.62; margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; quotes: none; background-color: transparent;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">$ ssh-keygen -t rsa -C “<span style="margin: 0px; padding: 0px; line-height: 17px; background-color: transparent;">haiyan.xu.vip</span>@gmail.com”</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">输入第一个参数:生成秘钥名称</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">输入第二个参数:秘钥</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">输入第三个参数:确认秘钥</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;"><span style="color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22.6800003051758px;">最后得到了两个文件:XXX  和  XXX.pub</span>
</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">
</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">二,登陆管理员端,gitHug账户:</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">     找到项目:Settings  -- > Collaborators  添加账户名称</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">                                      --> Deploy keys     添加账户秘钥</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">
</p></blockquote>



猜你喜欢

转载自blog.csdn.net/ly10265139/article/details/51180306