当前位置:   article > 正文

vue-element-admin-4.4.0 npm install /usr/bin/git ls-remote 报错 无法连接到 github.com_npm err! /usr/bin/git ls-remote -h

npm err! /usr/bin/git ls-remote -h

故障

  1. npm ERR! Error while executing:
  2. npm ERR! /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git
  3. npm ERR!
  4. npm ERR! fatal: 无法连接到 github.com:
  5. npm ERR! github.com[0: 20.205.243.166]: errno=连接超时
  6. npm ERR!
  7. npm ERR!
  8. npm ERR! exited with error code: 128
  9. npm ERR! A complete log of this run can be found in:
  10. npm ERR! /home/yeqiang/.npm/_logs/2022-06-15T03_28_17_243Z-debug.log

解决:在当前项目目录下运行指令

  1. npm config set registry https://registry.npmmirror.com
  2. git config --global url."https://".insteadOf git://

效果

  1. yeqiang@yeqiang-PC:~/Downloads/src/vue-element-admin-4.4.0$ npm config set registry https://registry.npmmirror.com
  2. yeqiang@yeqiang-PC:~/Downloads/src/vue-element-admin-4.4.0$ git config --global url."https://".insteadOf git://
  3. yeqiang@yeqiang-PC:~/Downloads/src/vue-element-admin-4.4.0$ npm install
  4. 略。。。
  5. added 2043 packages from 2006 contributors in 75.161s
  6. 94 packages are looking for funding
  7. run `npm fund` for details
  8. yeqiang@yeqiang-PC:~/Downloads/src/vue-element-admin-4.4.0$

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

闽ICP备14008679号