git

终端:cd ~/.ssh

这里写图片描述

// 生成SSH Key(你的邮箱):

$ ssh-keygen -t rsa -C lizhimin@gmail.com

// 回车后(输入密码):

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/lizhimin/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 

// 结果:

Your identification has been saved in /Users/lizhimin/.ssh/id_rsa.
Your public key has been saved in /Users/lizhimin/.ssh/id_rsa.pub.
The key fingerprint is:
0a:7a:82:a5:9f:07:9b:be:6c:29:07:30:9d:c6:13:c2 542045215@qq.com
The key's randomart image is:
+--[ RSA 2048]----+
|.                |
|.E.              |
| + o             |
|o *              |
|.o...   S        |
|.+.. . .         |
|o.o=. .          |
|.o*+.            |
| =*o             |
+-----------------+

// 然后在这个目录就可以找到你生成的SSH Key:

/Users/lizhimin/.ssh/id_rsa.pub.  //  pbcopy < ~/.ssh/id_rsa.pub  复制秘钥

// 然后将内容添加到你的GitHub中:

 

posted @ 2017-04-17 15:20  九五之尊唯我独尊  阅读(112)  评论(0编辑  收藏  举报