解決hexo報錯spwan failed


報錯1


FATAL {
  err: Error: Spawn failed
      at ChildProcess.<anonymous> (/usr/local/src/hexo/cairbin/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/cairbin/

##刪除git提交文件夾
rm -rf .deploy_git/

git config --global core.autocrlf false

  • 最后重新生成提交
hexo clean && hexo g && hexo d

在提交的過程可能又出現以下報錯

報錯2

! [remote rejected] master -> master (push declined due to email privacy restrictions)

解決方案

  • 這是因為你的github設置出了問題
  • 瀏覽器進入github.com
  • 登陸github -> "+" ->settings
  • 后續操作如下圖

  • 將下方這兩個設置取消勾選

  • 重新提交
hexo clean && hexo g && hexo d

大功告成

如果不報錯,重新訪問頁面,就發現已經提交成功了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM