首页 > hexo搭建博客过程中出现的问题

hexo搭建博客过程中出现的问题

hexo d 的时候出现如下错误,不知道怎么结局

fatal: unable to access 'https://github.com/769824456/769824456.github.io.git/': Failed to connect to github.com port 443: Timed out
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: fatal: unable to access 'https://github.com/769824456/769824456.github.io.git/': Failed to connect to github.com port 443: Timed out

at ChildProcess.<anonymous> (E:\NoteData\hexo\node_modules\hexo-util\lib\spawn.js:37:17)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at ChildProcess.cp.emit (E:\NoteData\hexo\node_modules\cross-spawn-async\lib\enoent.js:37:29)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

FATAL fatal: unable to access 'https://github.com/769824456/769824456.github.io.git/': Failed to connect to github.com port 443: Timed out

Error: fatal: unable to access 'https://github.com/769824456/769824456.github.io.git/': Failed to connect to github.com port 443: Timed out

at ChildProcess.<anonymous> (E:\NoteData\hexo\node_modules\hexo-util\lib\spawn.js:37:17)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at ChildProcess.cp.emit (E:\NoteData\hexo\node_modules\cross-spawn-async\lib\enoent.js:37:29)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

错误显示你这是连接到github超时。使用下面的命令检测是否可以连接上github:

$ ssh -T git@github.com

如果出现类似红框中的文字即说明可以连接到github,如果没有的话,可能是你的配置有问题,请仔细检查下你的配置。配置的Github远程仓库的地址最好使用SSH的地址。
我的配置如下所示:

deploy:
  type: git
  repo: ssh://git@github.com/dkylin/dkylin.github.io.git
  branch: master

hexo d是发布到github的命令,目测你的错误是链接到github超时。https的默认端口是443 可能是因为网速的原因。可以先试试能否访问github.com。然后再发布

Make sure you have set up git on your computer properly or try to use HTTPS repository URL instead.


使用ssh链接,本地生成密钥然后添加到你项目

【热门文章】
【热门文章】