npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/adobe-webplatform/eve.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Develo\nodejs\node_cache\_logs\2022-02-23T03_34_18_949Z-debug-0.log
在git上下载以来的vue-element-admin 安装依赖的时候报错。
以上这个报错是我最头疼的,弄了很久,网上查阅了各种文章,还是没有找到解决的办法,最后我通过自己解决了问题。
这个问题是ssh的报错,我们需要想办法把ssh改成https,这样就可以解决啦,那么下面我来介绍一下如何操作。
首先,如果你遇到128这种报错,不要考虑换镜像啥的,这是一个ssh的错误,改了镜像也会报这种错误,你可以在C盘下的C:\Users\用户名 下找到.gitconfig,然后跟着我改:

完成之后,你再运行:
npm install --registry=https://registry.npm.taobao.org
问题就解决啦:

开心的输入:
npm run dev
坐等自动弹窗:

完美!!!!,解决啦!
有问题,你给我留言,我一定会尽最大的努力帮你解决问题!。
记得点赞哦
在尝试从GitHub克隆vue-element-admin并安装依赖时遇到了npm代码128和权限错误。问题根源在于SSH配置。通过将ssh链接替换为https,并修改.gitconfig文件,然后使用`npm install --registry=https://registry.npm.taobao.org`,成功解决报错。最后运行`npm run dev`启动项目,一切顺利。
1万+

被折叠的 条评论
为什么被折叠?



