首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >(已解决)npm ERR! command failed npm ERR! command git ls-remote ssh://git@github.com/nhn/raphael.git

(已解决)npm ERR! command failed npm ERR! command git ls-remote ssh://git@github.com/nhn/raphael.git

作者头像
知识浅谈
发布2021-09-27 11:13:57
发布2021-09-27 11:13:57
5.1K20
代码可运行
举报
文章被收录于专栏:分享学习分享学习
运行总次数:0
代码可运行

这个错必须要记录一下了,看了网上很多的解决方法,最后终于找到原因了,

代码语言:javascript
代码运行次数:0
运行
复制
npm ERR! code 128
npm ERR! command failed
npm ERR! command git 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! Please make sure you have the correct access rights
npm ERR! and the repository exists.

之所以是这样,是因为本地生成的SSH keys添加到github里面,,这个生成的SSH keys 是带有密码的

解决方法 桌面右键,git bash here 输入以下 ssh-keygen -t rsa -C “你的邮箱名称” overwrite 输入y 输入密码的时候直接回车 重复密码输入还是直接回车,然后把github上以前的sshkeys删除,c盘->用户->你的用户名->.ssh->id_rsa.pub里边的字符添加到 github右上角头像->settings->ssh & GPG ->Add sshKeys 第二个大框里输入确认即可

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021/08/05 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档