NPM 表示可能存在安全错误:
% meteor npm install mui/system
npm ERR! Error while executing:
npm ERR! /usr/local/bin/git ls-remote -h -t ssh://[email protected] /cdn-cgi/l/email-protection/mui/system.git
npm ERR!
npm ERR! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
npm ERR! @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
npm ERR! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
npm ERR! IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
npm ERR! Someone could be eavesdropping on you right now (man-in-the-middle attack)!
npm ERR! It is also possible that a host key has just been changed.
npm ERR! The fingerprint for the RSA key sent by the remote host is
npm ERR! SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
npm ERR! Please contact your system administrator.
npm ERR! Add correct host key in /Users/myUserAccount/.ssh/known_hosts to get rid of this message.
npm ERR! Offending RSA key in /Users/myUserAccount/.ssh/known_hosts:1
npm ERR! Host key for github.com has changed and you have requested strict checking.
npm ERR! Host key verification failed.
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!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/myUserAccount/.npm/_logs/2023-05-04T14_51_29_508Z-debug.log
处理这个问题的正确方法是什么?
mui 团队指导我这一页 https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/,这就解决了这个问题。
我运行此命令来删除旧条目:
ssh-keygen -R github.com
然后我手动编辑“~/.ssh/known_hosts”并添加此行:
github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUky4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZf xd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkz wDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUnn+EjqoTwvqNj4kq x5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=
当然,我必须记住关闭终端窗口并打开一个新窗口才能使更改生效。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)