问题描述:

  // 第一次遇到的问题
Error: packet_write_wait: Connection to 192.30.253.113 port 22: Broken pipe
packet_write_wait: Connection to 192.30.253.113 port 22: Broken pipe
fatal: sha1 file '<stdout>' write error: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: packet_write_wait: Connection to 192.30.253.113 port 22: Broken pipe
fatal: sha1 file '<stdout>' write error: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly at ChildProcess.<anonymous> (D:\blog\node_modules\hexo-util\lib\spawn.js:37:17)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at ChildProcess.cp.emit (D:\blog\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  // 第N次遇到的问题
[master 852bb8c] Site updated: 2018-10-20 02:04:33
67 files changed, 536 insertions(+), 536 deletions(-)
Connection reset by 192.30.253.113 port 22
fatal: sha1 file '<stdout>' write error: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: Connection reset by 192.30.253.113 port 22
fatal: sha1 file '<stdout>' write error: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly at ChildProcess.<anonymous> (D:\blog\node_modules\hexo-util\lib\spawn.js:37:17)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at ChildProcess.cp.emit (D:\blog\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

解决方法:

往 Github push 文件时出现 packet_write_wait: Connection to 192.30.253.112: Broken pipe 这个问题是因为传输

过程被打断,而导致传输失败。

1、尝试过 ssh -o ServerAliveInterval=60 [email protected](只有一次有效,后面再遇到就挂了!)

2、有网友说:删除.deploy_git文件后重新部署(我试了一下还是挂了!)

3、改用手机热点(竟然可以了,Why??防火墙??)

04-01 20:24