Hexo 博客报错合集
ERROR one
Please make sure you have the correct access rights
and the repository exists.
FATAL Something’s wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.
at ChildProcess.emit (events.js:189:13)
at ChildProcess.cp.emit (E:\Blog\node_modules_cross-spawn@4.0.2@cross-spawn\lib\enoent.js:40:29)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
原因:可能未绑定Git账号
解决方法:
1 | git config --global user.name "git用户名" |
或者:
把_config.yml中改为以下:
repo:https://hztjiayou:{your github password}@github.com/hztjiayou/hztjiayou.github.io.git
上述方法可能不管用,有可能是网络不通的原因,可以查看电脑能否访问github.com,然后再尝试部署。
ERROR two
有时候存在通过hztjiayou.github.io可以访问而域名不能访问的情况,这是因为域名和GitHub之间的连接出了问题,本应该在GitHub仓库中存在一个名字为“CNAME”的文件(里面填写的是不包括www前缀的域名地址),可是有可能在同步的时候本地没有这个文件,所以导致GitHub仓库中也没有这个文件,解决办法是在\Blog\public\路径下添加此文件(文件可以通过github获得)。