hexo:未找到ERROR Deployer:github

时间:2015-12-24 12:04:59

标签: git github hexo

问题:

hexo-blog$ hexo deploy

ERROR Deployer not found: github

然后我这样做

Hi XXXXXX! You've successfully authenticated, but GitHub does not provide shell access.

hexo-blog$ git remote -v
origin  git@github.com:FantasRu/data-structure-learning.git (fetch)
origin  git@github.com:FantasRu/data-structure-learning.git (push)

Screenshot 1

我也推得很好

Spider$ git push origin master

Counting objects: 9, done.

Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.

Writing objects: 100% (9/9), 41.43 KiB | 0 bytes/s, done.

Total 9 (delta 1), reused 0 (delta 0)

To https://github.com/FantasRu/Spider.git

174fcd0..2fc6d48  master -> master

所以我的hexo错了,为何无法连接git

这里是部署设置

Screenshot 2

2 个答案:

答案 0 :(得分:3)

您必须安装hexo-deployer-git才能在指定的分支上使用git部署生成的网站。

npm install hexo-deployer-git --save

请注意,使用当前配置,您将清除master分支上的所有源代码。我建议您在gh-pages上部署,以便https://github.com/username/repository_name

自动访问
deploy:
    type: git
    repo: <repository url>
    branch: gh-pages

阅读hexo - deployment文档以获取更多信息

答案 1 :(得分:1)

将类型从github更改为git。