部署github博客是部署的时候执行dexo d命令时报以下错误
var foo = 'bar';error: src refspec HEAD does not match any error: failed to push some refs to
'https://github.com/bing/bing.github.io.git' FATAL Something's wrong. Maybe you can find the solution here:
https://hexo.io/docs/troubleshooting.html Error: Spawn failed at ChildProcess.<anonymous> (E:\blog\node_modules\hexo-
util\lib\spawn.js:51:21) at ChildProcess.emit (events.js:210:5) at ChildProcess.cp.emit (E:\blog\node_modules\cross-
spawn\lib\enoent.js:34:29) at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
解决办法:
-
删除.deploy_git文件后重新部署
-
依次执行
dexo clean
dexo g
dexo d
- 根目录下的_config文件中的
// An highlighted block
deploy:
type: git
repository: https://github.com/bing/bing.github.io.git
email: xihuRiver@xihuRiver.com
name: xihuRiver
branch: master