window hexo 部署到github

hexo d -g

出现以下错误

d by CRLF in vendors/velocity/velocity.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in vendors/velocity/velocity.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in vendors/velocity/velocity.ui.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in vendors/velocity/velocity.ui.min.js.
The file will have its original line endings in your working directory.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

    at ChildProcess.<anonymous> (E:\zan\www\gitpages\hexo\vuecn.github.io\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:42:17)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

ssh 配置 好了
手动提交的是可以提的

hexo d -g 就不行

如何破 ? 大神指导一下吗?

阅读 5.7k
5 个回答

Error: Permission denied (publickey).
这个是关键,要在 github 上设置ssh key

百度传送门

你的key没添加到github上把,测试下ssh -T git@github.com,成功的话在github上的ssh key就是一个小绿点!

先分解下找到问题所在,
hexo g 看是否能编译成静态文件
然后再hexo d 看是否能提交

我也是最近才搭建的hexo博客,网上资料确实有很多坑,可以参考下我搭建的流程:
在github上使用hexo搭建博客

key 没问题,但是还是出现这种问题,无语了,每过一段时间不用hexo,就会出现各种问题,遂重装hexo解决

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进