hexo多平台部署遇到的一个坑
Jul 25, 2015
在尝试部署网站到Github和Gitcafe的时候,一直出现以下问题。
1 | FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/do |
尝试了各种解决方案
方案一
在repo:冒号后面加一个空格变成1
2
3repo: #<-#前面有一个空格
github: git@github.com:rtafip/rtafip.github.io.git
gitcafe: https://gitcafe.com/rtafip/rtafip.git还是报相同的错误
方案二
将repo:git@github.com:rtafip/rtafip.github.io.git使用双引号包住1
2
3repo:
github: "git@github.com:rtafip/rtafip.github.io.git"
gitcafe: https://gitcafe.com/rtafip/rtafip.git还是提示相同的问题
……
……
……
最后要都要抓狂了才找到解决方案
原来的代码是这样的1
2
3
4
5deploy:
type: git
repo:
github: git@github.com:rtafip/rtafip.github.io.git
gitcafe: https://gitcafe.com/rtafip/rtafip.git
最后的代码是这样的1
2
3
4
5deploy:
type: git
repo:
github: git@github.com:rtafip/rtafip.github.io.git
gitcafe: https://gitcafe.com/rtafip/rtafip.git
看出区别了吗?
原来只是repo前面多了一个空格!!!
YAML真是一种脆弱的格式!多一个空格不行,少一个空格不行,空格位置不对不行。而且我也不知道怎么把这个空格引进来的。最重要是提示的位置不对啊。提示的是冒号后面啊。应该这么提示才对
1 | FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/do |
替我问候写这个分析工具的人母亲。