在github上下载的项目出现vue-element-admin 的 npm install 报错npm ERR code 128 npm ERR An unknown git error occurred报错。
报错截图
解决办法
1.网上搜的第一种解决方案(对我无效)
git config --global http.sslverify "false"
npm i
2.第二种改变.shh文件(对我无效)
C盘下的C:\Users\用户名 下找到.gitconfig,然后更改:
控制台输入
npm install --registry=https://registry.npm.taobao.org
npm i
3.控制台输入(有效)
git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"
npm i
npm run dev