使用Hexo+ Github 建站 时 使用 hexo d 命令异常:You should configure deployment settings in _config.yml first! Available deployer plugins: git For more help, you can check the online docs: https://hexo.io/

今天莫名其妙的发布博客到github上发现报错了,错误如下:
使用Hexo+ Github 建站 时 使用 hexo d 命令异常:You should configure deployment settings in _config.yml first!  Available deployer plugins:   git  For more help, you can check the online docs: https://hexo.io/

1:排查是否安装一下hexo-deployer-git这个模块
没有安的话装使用指令安装:npm install hexo-deployer-git --save

2:检查deploy: 下面的节点 如type:这些 需要缩进。 之前是这种格式

使用Hexo+ Github 建站 时 使用 hexo d 命令异常:You should configure deployment settings in _config.yml first!  Available deployer plugins:   git  For more help, you can check the online docs: https://hexo.io/

改成这种格式即可:
使用Hexo+ Github 建站 时 使用 hexo d 命令异常:You should configure deployment settings in _config.yml first!  Available deployer plugins:   git  For more help, you can check the online docs: https://hexo.io/

最后注意这段配置之间的空格(一定要有空格):

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: git@github.com:imtudou/imtudou.github.io.git
  branch: master