赞
踩
当hexo init时,报错:
- INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
- error: RPC failed; curl 28 OpenSSL SSL_read: Connection was reset, errno 10054
- fatal: expected flush after ref listing
- WARN git clone failed. Copying data instead
- FATAL {
- err: [Error: ENOENT: no such file or directory, scandir 'C:\Users\Jupiter\AppData\Roaming\npm\node_modules\hexo-cli\assets'] {
- errno: -4058,
- code: 'ENOENT',
- syscall: 'scandir',
- path: 'C:\\Users\\Jupiter\\AppData\\Roaming\\npm\\node_modules\\hexo-cli\\assets'
- }
- } Something's wrong. Maybe you can find the solution here: %s http://hexo.io/docs/troubleshooting.html
说明Github被墙了,一般给出的解决方案都是挂梯子,但是如果没有梯子呢?
实际上,可以使用Gitee(码云)来替代Github,将文件:
C:\Users\Jupiter\AppData\Roaming\npm\node_modules\hexo-cli\lib\console\init.js
中的
const GIT_REPO_URL = 'https://github.com/hexojs/hexo-starter.git';
改为:
const GIT_REPO_URL = 'https://gitee.com/hexojs/hexo-starter.git';
就可以了,亲测有效。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。