ssh key 生成

1.设置好git的name和email

$ git config --global user.name "姓名"

$ git config --global user.email "邮箱地址"

2.创建ssh key

$cd ~/.ssh/

如果有密钥,最好都备份好

$ ssh-keygen -t rsa -C "邮箱地址"

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/ping/.ssh/id_rsa): 

Enter passphrase (empty for no passphrase): 

Enter same passphrase again: 

Your identification has been saved in /Users/ping/.ssh/id_rsa.

Your public key has been saved in /Users/ping/.ssh/id_rsa.pub.

The key fingerprint is:

一直回车到最后一步,完成

 

posted on 2016-05-31 14:04  木头平  阅读(247)  评论(0编辑  收藏  举报

导航