0

NPM says there may be a security error:

% meteor npm install mui/system
npm ERR! Error while executing:
npm ERR! /usr/local/bin/git ls-remote -h -t ssh://git@github.com/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

What's the correct way to handle this?

VikR
  • 4,818
  • 8
  • 51
  • 96

1 Answers1

0

The mui team directed me to this page, and that fixed it.

I ran this command to remove the old entry:

 ssh-keygen -R github.com

Then I manually edited "~/.ssh/known_hosts" and added this line:

github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=

Of course I had to remember to close my terminal window and open a new one to get the changes to be in effect.

VikR
  • 4,818
  • 8
  • 51
  • 96
  • Yes, that is the page I reference in my answer I linked in my comment. – VonC May 05 '23 at 06:49
  • Okay, if you post this as an answer I will click it as the accepted answer. – VikR May 05 '23 at 06:56
  • No need: this is a duplicate of other questions. You might consider editing your answer to include the exact change/command you had to do in your case, as well as include any detail specific to a MUI environment/project. – VonC May 05 '23 at 12:21