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

重装系统之后Hexo快速配置

时间:2016-07-06 23:06:00      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:

安装准备软件

  • Node.js
  • Git

打开 Git Bash

hexo文件夹,右键:
技术分享
技术分享

配置SSH Keys

检查SSH keys设置,看一下电脑现有的ssh key
cd ~/. ssh 检查本机的ssh密钥

如果提示:

No such file or directory

说明是第一次使用git

生成新的SSH Key:

ssh-keygen -t rsa -C "邮件地址@youremail.com" # -C大写,无需引号
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):<回车就好>

然后输入密码,可以回车跳过,密码是防止别人往你的项目中提交内容:

Enter passphrase (empty for no passphrase):<输入加密串>
Enter same passphrase again:<再次输入加密串>

显示成功设置ssh key:

 技术分享

添加SSH Key到GitHub上

  • 找到刚才生成的id_rsa.pub文件,复制所有内容;
  • 登录github, 点击右上角的 Account Settings--->SSH Public keys ---> add another public keys
  • 粘贴,然后保存

测试

可以输入下面的命令,看看设置是否成功,git@github.com的部分不要修改:
ssh -T git@github.com
The authenticity of host github.com (207.97.227.239) cant be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)?  # 直接输入yes
Hi cnfeat! Youve successfully authenticated, but GitHub does not provide shell access

搞定收工。。。

 

参考: http://www.jianshu.com/p/05289a4bc8b2

  

重装系统之后Hexo快速配置

标签:

原文地址:http://www.cnblogs.com/zhanglianbo/p/5648206.html

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