Hexo部署出现错误err: Error: Spawn failed解决方式
本文最后更新于:2021年9月13日 晚上
Hexo部署出现错误err: Error: Spawn failed解决方式
部署过程中可能会出现错误
fatal: unable to access 'https://github.com/a956551943/a956551943.github.io/': Encountered end of file
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (/usr/local/src/hexo/hanyubolg/node_modules/hexo-util/lib/spawn.js:51:21)
at ChildProcess.emit (events.js:376:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
code: 128
}
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
解决方式一:
##进入站点根目录
cd d://blog/codeanime/
##删除git提交内容文件夹
rm -rf .deploy_git/
##执行
git config --global core.autocrlf false
##最后
hexo clean && hexo g && hexo d
解决方式二:有可能是你的git repo配置地址不正确,可以将http方式变更为ssh方式
##进入站点根目录
cd /usr/local/src/hexo/hanyubolg/
##删除git提交内容文件夹
vim _config.yml
##修改
deploy:
type: git
repo: https://github.com/yourname/yourname.github.io.git -> git@github.com:a956551943/weixiaohui.github.io.git
branch: master
##最后
hexo clean
hexo g
hexo d
解决方式三:不建议
##进入站点根目录
cd /usr/local/src/hexo/hanyubolg/
##进入depoly文件夹
cd .deploy_git/
##强制推送
git push -f
文章来源:www.jianshu.com, 作者:翰羽,版权归原作者所有,如需转载,请联系作者。
本文作者: CodeAnime
本文链接: https://codeanime.cc/Hexo%E9%83%A8%E7%BD%B2%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AFerr-Error-Spawn-failed%E8%A7%A3%E5%86%B3%E6%96%B9%E5%BC%8F.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!