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

hexo github

时间:2020-01-06 10:06:33      阅读:95      评论:0      收藏:0      [点我收藏+]

标签:ast   gen   install   个人   全局   rsa   epo   repo   eve   

??需要一个github帐号
https://github.com/nevereverretn

??需要github特定仓库来存储个人博客网站
username.github.io的username一定与前面的owner一致
https://github.com/nevereverretn/nevereverretn.github.io

??需要为github配置ssh key便于上传
??ssh key可以防止其他人恶意部署文件到仓库,可以不配置
??客户端生成ssh key

ssh-keygen -t rsa -C "youremail@example.com"  

??服务端设置ssh key
Settings -> SSH and GPG keys -> New SSH key,添加客户端生成的id_rsa.pub中的内容

??安装插件

$ npm install hexo-deployer-git

??如果git没有配置则全局配置

$ git config --global user.email "you@example.com"
$ git config --global user.name "Your Name"

??全局配置文件 ..\博客根目录?_config.yml
??上传github设置

deploy:
  type: git
  repository: git@github.com:nevereverretn/nevereverretn.github.io.git
  branch: master

??生成并上传

$ hexo d -g 

??国外网站,速度你懂的

hexo github

标签:ast   gen   install   个人   全局   rsa   epo   repo   eve   

原文地址:https://www.cnblogs.com/dailycode/p/12154500.html

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