GitHub 快速上手 ---- 创建**,连接

首先要在GitHub上创建一个帐号,由于本地Git仓库和GitHub仓库之间的传输是通过SSH加密的,所以要在本地生成一个私钥和一个**

命令,后面跟的邮箱,要跟你自己的;加入输出的位置;可以不用设置密码一路按回车就行了

[objc] view plain copy
  1. //lindeMac-mini:~ a123$ ssh-****** -C 'yourEmail' -t rsa  
  2. lindeMac-mini:~ a123$ ssh-****** -C '[email protected]' -t rsa  
  3. Generating public/private rsa key pair.  
  4. Enter file in which to save the key (/Users/a123/.ssh/id_rsa): /Users/a123/Desktop/QY   
  5. Enter passphrase (empty for no passphrase):   
  6. Enter same passphrase again:   
  7. Your identification has been saved in /Users/a123/Desktop/QY .  
  8. Your public key has been saved in /Users/a123/Desktop/QY .pub.  
  9. The key fingerprint is:  
  10. 93:84:b7:37:eb:2f:71:78:02:3c:66:e7:c4:9f:dd:0412695816@qq.com  
  11. The key's randomart image is:  
  12. +--[ RSA 2048]----+  
  13. |                 |  
  14. |       .         |  
  15. |      ..o.       |  
  16. |       o*o+      |  
  17. |       oS*oo o . |  
  18. |         o=o= E .|  
  19. |          .=   o |  
  20. |         ..     .|  
  21. |          .o.    |  
  22. +-----------------+  
在桌面即可看到两个文件QY是私钥, QY.pub是**

GitHub 快速上手 ---- 创建**,连接
打开QY.pub文件(可以用Xcode打开),复制里面的内容粘贴到GitHub指定的位置,按以下步骤可以添加一个公钥

title的名字可以随意写

GitHub 快速上手 ---- 创建**,连接