Hexo部署出现错误err-Error-Spawn-failed解决方式

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 /usr/local/src/hexo/hanyubolg/
​
##删除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, 作者:翰羽,版权归原作者所有,如需转载,请联系作者。

原文链接: https://www.jianshu.com/p/c60ad2a33a1e

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值