当前位置:   article > 正文

解决报错: ERR! code 128npm ERR! An unknown git error occurred_npm err! code 128 npm err! an unknown git error oc

npm err! code 128 npm err! an unknown git error occurred npm err! command gi

在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,即可解决。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/516270
推荐阅读
相关标签
  

闽ICP备14008679号