githubssh配置
打开 git-bash输入ssh-krygen -t rsa -C"github邮箱"
然后无限回车直到出现
打开文件夹
C:\Users\黄鹏.ssh\id_rsa.pub
打开文本的方式打开id_rsa.pub
全部复制下来
打开地址https://github.com/settings/keys
点击New SSH key
Title随便输Key输入刚才复制的内容
hexo本地安装使用
建一个自己放博客的文件路径
用cmd进入到自己建的文件夹输入npm install hexo-cli -g
输入hexo init 博客名
cd 博客名
npm install
hexo s -p xxxx (xxx表示自己想设置的端口号)
在浏览器输入localhost:xxx(xxx为端口号)
hexo发布到github
打开博客文件夹下的_config.yml
找到下面内容更改
1 |
title: 博客名(sagejiushuの博客) |
找到最下面
1 |
deploy: |
保存并退出打开刚才的cmd输入npm install hexo-deployer-git --save
绑定邮箱cmd输入git config --global user.email "自己的邮箱"
git config --global user.name "github的用户名"
hexo g
hexo d
hexo s -p xxxxxx为自己的端口
如果出现下图 ,直接输入自己的github账号和密码就可以了
ok现在github博客就搭建好了 在浏览器输入https://仓库名.github.io