hexo之SSH kEY 二

GitHub

首先注册一个『GitHub』帐号,已有的默认默认请忽略
建立与你用户名对应的仓库,仓库名必须为『your_user_name.github.com』
添加SSH公钥到『Account settings -> SSH Keys -> Add SSH Key』

添加SSH-Key。

首先设置你的用户名密码:

1
2
git config --global user.email "bu.ru@qq.com"
git config --global user.name "bruce-sha"

More info: Writing

生成密钥:

1
ssh-keygen -t rsa -C "bu.ru@qq.com"

More info: Server

输入文件路径:

1
2
3
4
5
6
7
8
9
H:\hexo\blog>ssh-keygen -t rsa -C "bu.ru@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa): H:\git\myssh\ssh
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in H:\git\myssh\ssh.
Your public key has been saved in H:\git\myssh\ssh.pub.
The key fingerprint is:
b0:0c:2e:67:33:ab:c1:50:10:40:0a:ba:c1:80:59:22 bu.ru@qq.com

More info: Generating

最后可以验证一下:

1
ssh -T git@github.com

More info: Deployment

你是本站第位访客 本站访客数人次
Fork me on GitHub