在github上下载的项目出现vue-element-admin 的 npm install 报错npm ERR code 128 npm ERR An unknown git error occurred报错。
报错截图
![](https://img-blog.csdnimg.cn/img_convert/306fcb9847b48d3673923f3cecb26ed9.png)
解决办法
1.网上搜的第一种解决方案(对我无效)
git config --global http.sslverify "false"
npm i
2.第二种改变.shh文件(对我无效)
C盘下的C:\Users\用户名 下找到.gitconfig,然后更改:
![](https://img-blog.csdnimg.cn/img_convert/e8d2814f4b083873f73779420ba97244.png)
控制台输入
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