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

网友投稿 1090 2022-10-05 07:05:00

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

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

npm ERR! code 128npm ERR! command failednpm ERR! command git ls-remote ssh://git@github.com/nhn/raphael.gitnpm 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 rightsnpm ERR!

之所以是这样,是因为本地生成的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 第二个大框里输入确认即可

基本上绝大部分同学上边弄完之后就可以了

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:微信小程序中格式化时间的代码实现(微信小程序日期格式化)
下一篇:小程序实例:如何根据经纬度计算两点之间的距离(代码)(小程序获取经纬度和高度)
相关文章