[hexo] 用Hexo d提交博客时出现连接不了的错误

  • Connection reset
  • fatal: Could not read from remote repository
  • Error: Spawn failed

这次写完博客,准备用hexo d命令上传的时候报了一堆错…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
The file will have its original line endings in your working directory.
On branch master
nothing to commit, working directory clean
Connection reset by xx.xxx.xxx.xxx
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: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.<anonymous> (F:\xxx\Blogs\hexo-doc\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:xx:xx)
at ChildProcess.emit (events.js:xxx:x)
at ChildProcess.cp.emit (F:\xxx\Blogs\hexo-doc\node_modules\hexo-deployer-git\node_modules\cross-spawn\lib\enoent.js:xx:xx)
at Process.ChildProcess._handle.onexit (internal/child_process.js:xxx:xx)

中间我隐去了一些地址什么的,大概的问题包括:

  • Connection reset
  • fatal: Could not read from remote repository
  • Error: Spawn failed

查阅不少博客之后我的问题解决了,先删除原先的ssh文件,重新生成一个并存到GitHub账户里。然后—删除本地博客目录下的文件夹.deploy_git,好了,重新hexo g+gulp+hexo d就Okay了。

事后我觉得这次bug的原因是我用hexo new "blog title"生成新博客之后对标题不满意,手动在本地修改了md文件的文件名和对应的图片文件夹名 ,导致.deploy_git的内容和不知道哪里出现了一些不匹配?当然这个原因是我猜的~如有高见可以指点我QwQ