解决报错: ERR! code 128npm ERR! An unknown git error occurred

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

在github下载的项目运行时进行npm install安装依赖时出现如下错误

npm ERR! code 128

npm ERR! An unknown git error occurred

npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/nhn/raphael.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! C:\Users\Acer\AppData\Local\npm-cache\_logs\2023-02-09T12_33_12_237Z-debug-0.log

报错图片

解决办法

实际产生错误的原因是ssh密钥的问题只要在github添加上密钥就可以了。

查找ssh密钥c盘->user(用户)->主机名字->.ssh

然后复制文件里面的内容到github上。

重新运行npm istall,即可解决。

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6