以下为安装出问题的总结 安装hexo后,bash: hexo: command not found
找到C:\Users\Administrator\AppData\Roaming\npm\node_modules\hexo\bin\,将此目录添加到环境变量中 执行 hexo deploy 后,出现 error deployer not found:github 的错误
hexo 更新到3.0之后,deploy的type 的github需要改成git
repository路径: http://github.com/imsofter/imsofter.github.io.git (需要将https修改成http)还不行的话尝试
git@github.com:imsofter/imsofter.github.io.git路径
改了之后执行npm install hexo-deployer-git --save 安装hexo对于git的部署工具。
然后再部署试试 验证报错报错verification failed:
Error: Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
解决方法:条件SSHkey
$ ssh-keygen -t rsa -C "imsofter@163.com"
三次回车,即可设置密码为空
将生成的C:\Users\Administrator.ssh目录下的id_rsa.pub添加到github上
再测试是否可以连接到github上,
$ ssh git@github.com
Hi imsofter! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
再可以将代码推上github上了。 绑定域名
在source目录下创建CNAME文件
DNS设置
用DNSpod,快,免费,稳定。
注册DNSpod,添加域名,如下图设置。