当前位置:   article > 正文

创建博客hexo init时报错Github被墙的解决方法_warn git clone failed. copying data instead fatal

warn git clone failed. copying data instead fatal something's wrong. maybe y

hexo init时,报错:

  1. INFO  Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
  2. error: RPC failed; curl 28 OpenSSL SSL_read: Connection was reset, errno 10054
  3. fatal: expected flush after ref listing
  4. WARN  git clone failed. Copying data instead
  5. FATAL {
  6.   err: [Error: ENOENT: no such file or directory, scandir 'C:\Users\Jupiter\AppData\Roaming\npm\node_modules\hexo-cli\assets'] {
  7.     errno: -4058,
  8.     code: 'ENOENT',
  9.     syscall: 'scandir',
  10.     path: 'C:\\Users\\Jupiter\\AppData\\Roaming\\npm\\node_modules\\hexo-cli\\assets'
  11.   }
  12. } 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';

就可以了,亲测有效。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/649773
推荐阅读
相关标签
  

闽ICP备14008679号