1. 程式人生 > >hexo d 部署部落格時出錯

hexo d 部署部落格時出錯

問題描述:

  // 第一次遇到的問題
  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??防火牆??)