首先在配置文件上填写:
1 | deploy: |
执行发布代码命令:
1 | hexo deploy |
提示 error deployer not found:git(说明没有发布工具)
然后拉去发布工具
1 | npm install hexo-deployer-git --save |
测试链接Github
1 | ssh -T git@github.com |
Permission denied(publickey)
提示缺少公钥
本地生成公钥1
ssh-keygen -t rsa -C "xxxx@xxx.com"
成功的话会在 ~/下生成 .ssh文件夹,进去,打开 id_rsa.pub,复制里面的key即可。
在github生成密钥,将本地公钥拷贝进去
再先进行发布行为OK