栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

npm ERR code 128npm ERR An unknown git error occurrednpm ERR command git --no-replace-objects l

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

npm ERR code 128npm ERR An unknown git error occurrednpm ERR command git --no-replace-objects l

安装 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! Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts.
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:nodejsnode_cache_logs2022-04-27T08_23_27_820Z-debug-0.log

尝试了很多种方法比如:npm cache clean --force

然后再:npm install

反正都是错误的

然后看了另外一个大佬的博文最终成功解决问题 

第一步:在你的电脑上 的开始里面找到一个Git文件夹,然后打开Git Bush,或者直接在桌面右键找到Git Bush here,打开

 

 之后你的c盘->用户->你的用户名->.ssh文件中会生成两个新的文件,一个叫id_rsa.pub

另一个是id_rsa,打开id_rsa.pub文件,将你刚刚复制的信息粘贴进去然后保存。每个人的信息都可能不同

 

 

然后再打开GitHub网站找到右上角你的账户,在找到settings

  

 

 

最后 

 

 

最后重新曲安装依赖就OK了 

 

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/841561.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号