GitHub 快速上手 ---- 创建**,连接
首先要在GitHub上创建一个帐号,由于本地Git仓库和GitHub仓库之间的传输是通过SSH加密的,所以要在本地生成一个私钥和一个**
命令,后面跟的邮箱,要跟你自己的;加入输出的位置;可以不用设置密码一路按回车就行了
- //lindeMac-mini:~ a123$ ssh-****** -C 'yourEmail' -t rsa
- lindeMac-mini:~ a123$ ssh-****** -C '[email protected]' -t rsa
- Generating public/private rsa key pair.
- Enter file in which to save the key (/Users/a123/.ssh/id_rsa): /Users/a123/Desktop/QY
- Enter passphrase (empty for no passphrase):
- Enter same passphrase again:
- Your identification has been saved in /Users/a123/Desktop/QY .
- Your public key has been saved in /Users/a123/Desktop/QY .pub.
- The key fingerprint is:
- 93:84:b7:37:eb:2f:71:78:02:3c:66:e7:c4:9f:dd:0e 412695816@qq.com
- The key's randomart image is:
- +--[ RSA 2048]----+
- | |
- | . |
- | ..o. |
- | o*o+ |
- | oS*oo o . |
- | o=o= E .|
- | .= o |
- | .. .|
- | .o. |
- +-----------------+
打开QY.pub文件(可以用Xcode打开),复制里面的内容粘贴到GitHub指定的位置,按以下步骤可以添加一个公钥
title的名字可以随意写