部署本地博客到gitee
部署本地博客到gitee
打开到blog文件夹
1
2git config --global user.name "刘翔升"
git config --global user.email "756680474@qq.com"运行代码
1
ssh-keygen -t rsa -C "756680474@qq.com"
需要回车3次,
运行代码,以获取密钥
1
cat ~/.ssh/id_rsa.pub
在gitee创建SSH公钥
复制上面的公钥,放入页面
测试是否设置成功
1
ssh -T git@gitee.com
修改配置文件 _config.yml
1
2
3
4
5# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: 'git'
repository: git@gitee.com:lxiangsheng147/lxiangsheng147.git完成最后的部署
1
npm install hexo-deployer-git --save
hexo上传到gitee
1
2
3
4
5
6
7
8hexo clean
# 清理网页
hexo g
# 生成网页
hexo s
# 预览网页
hexo d
# 上传到gitee更新下gitee内容
更新下就好!