克隆远程仓库代码的时候,往往在下载node_modules 时,偶尔出现以下报错信息,我们可以这样解决哟
2022-09-03 20:25 ly772186472 阅读(31) 评论(0) 编辑 收藏 举报npm ERR! Error while executing:
npm ERR! d:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
运行:
npm ERR! git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
git config --global url."https://".insteadOf git://
npm install --registry=https://registry.npm.taobao.org
git config --global http.sslVerify "false"
npm install --registry=https://registry.npm.taobao.org
npm ERR! git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
git config --global url."https://".insteadOf git:// 然后再 npm install --registry=https://registry.npm.taobao.org