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

第02天GIT:(12):Github托管代码(SSH Keys)

2017-03-20 00:00 197 查看
#####一、步骤

 SSH
 
 SSH key认证
 >> 公钥 : 存在github上面用来 解密
 >> 私钥 : 存在本地的一个.ssh文件夹下 用来加密

 1.登录GitHub
 创建一个代码仓库
 http://git@github.com:liyuhong165/weChat.git
 git@github.com:liyuhong165/weChat.git
 
 创建 ssh key 
 1.通过GitHub 里面的 : settings -> SSH and GPG keys
 2.查看当前的电脑有没有.ssh : 通过 Finder(command + shift + H) 到个人中心 看有没有 隐藏文件.ssh 如果有可以删除
 3.创建 .ssh(公钥、和私钥) : 
    通过GitHub 里面的 : settings -> SSH and GPG keys 
    查看命令 : generating SSH keys 
    {
        Checking for existing SSH keys : 检查有没有 .ssh
        Generating a new SSH key and adding it to the ssh-agent : 创建一个.ssh
    }
    通过 ssh-keygen -t rsa -b 4096 -C "你的邮箱"
 4.查看 .ssh 中的 id_rea.pub(公钥) 通过 文本编辑打开
 5.在GitHub 填写 SSH Key : 通过GitHub 里面的 : settings -> SSH and GPG keys -> New SSH Key
 6.title 随便填写 ,key 就填写 公钥的
 
 >>>
 7.Xcode通过 preference -> add Repository ->
    /
        Address         : git@github.com:liyuhong165/weChat.git
        Type            : Git
        Authentication  : SSH Keys
        passphrase      : git密码
    /
 8.如果 repositories 没什么问题 说明已经成功
 >>>














































内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  源代码管理工具