使用 Hexo 和 GitHub 搭建部落格,出現 hexo -d 報錯
阿新 • • 發佈:2019-01-08
問題描述
G:\blog>hexo d
INFO Deploying: git
INFO Setting up Git deployment…
‘git’ �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
FATAL Something’s wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: spawn git ENOENT
at notFoundError (G:\blog\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (G:\blog\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (G:\blog\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
解決方案
- 刪除你hexo 下面的.deploy_git資料夾
- 執行 $ git config –global core.autocrlf false
- 重新
hexo clean
hexo g
hexo d - 開啟自己的網址,進行驗證是否成功