【已解决】在使用npm install的时候提示错误 npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/xxx怎么解决?

  • 作者: 凯哥Java(公众号:凯哥Java)
  • VUE
  • 时间:2023-11-22 11:49
  • 1157人已阅读
简介 在使用npminstall的时候提示错误 npmERR!commandgit--no-replace-objectsls-remotessh://git@github.com/xxx怎么解决?错误如下图:解决方案:直接在项目中执行下面命令:git config --global url."https://".insteadOf 

🔔🔔好消息!好消息!🔔🔔

 如果您需要注册ChatGPT,想要升级ChatGPT4。凯哥可以代注册ChatGPT账号代升级ChatGPT4

有需要的朋友👉:微信号 kaigejava2022

在使用npm install的时候提示错误 npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/xxx怎么解决?

错误如下图:

bdce1e6c3c6f46d3dd4e15a8b1b8b9be.png


解决方案:

1.想办法连接连接到外网,可以正常访问GitHub

直接在项目中执行下面命令:

 git config --global url."https://".insteadOf git://

重新npm install ,最后成功了。



TopTop