码迷,mamicode.com
首页 > 其他好文 > 详细

git

时间:2017-04-17 15:56:23      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:key   copy   gen   const   number   keygen   ima   img   live   

终端: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中:

 

git

标签:key   copy   gen   const   number   keygen   ima   img   live   

原文地址:http://www.cnblogs.com/xmhu/p/6723102.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!