踩过的一些坑

Error: ssh_exchange_identification: read: Connection reset by peer

今天早上到公司试了一下 hexo ghexo d 命令,发现有这个问题,

1
2
3
4
5
6
7
8
9
10
11
12
Error: ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at ChildProcess.<anonymous> (/Users/wdy/Documents/Blog/node_modules/hexo-util/lib/spawn.js:37:17)
at ChildProcess.emit (events.js:180:13)
at maybeClose (internal/child_process.js:936:16)
at Socket.stream.socket.on (internal/child_process.js:353:11)
at Socket.emit (events.js:180:13)
at Pipe._handle.close [as _onclose] (net.js:541:12)

我猜测可能是网络环境的改变带来的,于是将网络改为手机热点之后,就成功了,

hexo d 命令报错ERROR Deployer not found: git

1
2
3
4
5
6
7
8
9
10
 ✘ ⚙ wdy@wdydeMacBook-Pro  ~/Documents/Joe  hexo d
ERROR Deployer not found: git

⚙ wdy@wdydeMacBook-Pro  ~/Documents/Joe  npm install hexo-deployer-Github --save

npm ERR! code E404
npm ERR! 404 Not Found: hexo-deployer-Github@latest

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wdy/.npm/_logs/2018-09-27T08_44_47_443Z-debug.log

解决:

1
2
3
4
5
6
7
npm uninstall hexo-depolyer-git
npm install hexo --save
hexo g
npm install
npm install hexo-deployer-git --save
hexo g
hexo d

参考