hexo d 提交时遇到的问题

今天提交hexo时,显示如下错误:

1
2
3
4
5
6
7
8
9
10
11
12
fatal: unable to access 'http://github.com/jjgame12/jjgame12.github.io.git/': Recv failure: 连接被对方重设
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: fatal: unable to access 'http://github.com/jjgame12/jjgame12.github.io.git/': Recv failure: 连接被对方重设
at ChildProcess.<anonymous> (/home/jj/hexo/node_modules/hexo-util/lib/spawn.js:37:17)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:897:16)
at Socket.stream.socket.on (internal/child_process.js:340:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:548:12)

可能的方法

经过网上查询,有的说是git版本太新,导致不能识别,但是我之前都使用过并且提交成功了的,难道后面更新了?我不记得我更新了啊。
据说安装稍微旧一点的git应该可以解决,我没有这样做。

正确的方法

后面又发现一个方法:
将hexo配置文件_config.yml中deploy下面的repository更改为
https://用户名:密码@github.com/pythonsoft/test.Git然后就可以了。(应该这样走的是ssh路线,我之前用的是http方式传输)
注意:用户名不是登陆账号名, 是github的用户名,如我的用户名就是jjgame12。
来源:w20101310的博客