重裝系統以後Hexo快速配置

安裝準備軟件

  • Node.js
  • Git

打開 Git Bash

hexo文件夾,右鍵:
hexo_1.png

配置SSH Keys

檢查SSH keys設置,看一下電腦現有的ssh key
cd ~/. ssh 檢查本機的ssh密鑰

若是提示:git

No such file or directory

說明是第一次使用gitgithub

生成新的SSH Key:shell

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):<回車就好>

而後輸入密碼,能夠回車跳過,密碼是防止別人往你的項目中提交內容:hexo

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

顯示成功設置ssh key:ssh

 

添加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)' can't 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! You've successfully authenticated, but GitHub does not provide shell access

搞定收工。。。ide

 

參考: http://www.jianshu.com/p/05289a4bc8b2測試

相關文章
相關標籤/搜索