最近開始學NodeJs,準備也在github上弄個一個Hexo博客練練過程中遇到一些問題總結一下。希望對遇到同樣問題的同學能有個幫助少走一些彎路。
- 其實用windows或mac客戶端直接去同步很順利沒遇到什么問題。主要是在使用Hexo deploy命令的時候。
我的配置文件deploy部分是這樣寫的
# Deployment ## Docs: http://hexo.io/docs/deployment.html deploy:type: gitrepo: git@github.com:dangkei/dangkei.github.io
1.第一次遇到錯誤
Error: spawn git ENOENTat exports._errnoException (util.js:746:11)at Process.ChildProcess._handle.onexit (child_process.js:1053:32)at child_process.js:1144:20at process._tickCallback (node.js:355:11)
檢查很多地方應該寫的都對,百度了一下
添加環境變量:C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\libexec\git-core
,這樣就解決
2.接著又有新的錯誤提示
fatal: Not a git repository (or any of the parent directories): .git
提示說沒有.git這樣一個目錄,解決辦法如下:
git init
git init
就可以了!
?