I am trying to use
sudo npm install
to install all my dependencies for an application written in nodejs. My OS is Ubuntu 13.04
How
Github just made changes to their ip address infrastructure. You can read here for more details https://github.com/blog/1606-ip-address-changes . Also, I have never seen a problem like this before. Is you package.json containing a git depency cloned via ssh?
Try echo 'yes' | sudo npm install. This may solve your problem. If it does not, try cloning via HTTPS instead or download the module as a tarball instead, which can be done like this https://api.github.com/repos/username/reponame/tarball
I landed here because I was getting this error and not understanding why. It turns out I had a typo in my npm command:
npm install -P -E @angular/common @angular/compiler @angular/core @angular/forms
@angular/platform-browser @angular/router @angular/animations@ angular/platform-browser-dynamic
Notice how the end of the line reads @angular/animations@ angular/platform-browser-dynamic
.
NPM interprets the last "package" as being a github repo and that is where the error comes from.
I know this does not actually answer the question but I put it up just in case anyone else encounters this by making a similar mistake.
Ssh rightly complains that they can't make sure you are indeed connecting to github's server through a secure channel. That might be why github is recommending https access, which works out-of-the-box thanks to its public key infrastructure.
Now, you can have it work, but be aware that it involves caching a public key fingerprint which, if done incorrectly, provides an attacker permanent man-in-the-middle attack.
Option 1 is use https url instead of ssh.
Option 2 is have ssh access work.
Do ssh -T git@github.com
but don't just type "yes". Check if the hash that is shown matches one of the hashed shown in https://help.github.com/articles/what-are-github-s-ssh-key-fingerprints/ (in your question it does, and see, the page is fetched through https for the same public key infrastructure reasons).
If the hash matches, then connection is indeed safe you can answer "yes" to ssh's question.
Ssh will show something like:
Warning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts.
After that, you will either see a message like
Permission denied (publickey).
which is good but shows that you need further configuration, or simply
Hi yourlogin! You've successfully authenticated, but GitHub does not provide shell access.
which means that all works well and you can retry your first operation.
Notice that if you retry the same ssh command, it should no longer ask the question.
I had same problem, you have just to add your SSH key to the ssh-agent, see this link :
https://help.github.com/articles/checking-for-existing-ssh-keys/
it worked with me.
Run ssh -o StrictHostKeyChecking=no git@github.com
in command prompt to add the authenticity to your known_hosts. Then you won't get the prompt the next time.
You sure you're not accidentally logged in as a different user (this happens to me when I sudo -s / login as root and forget my GitHub account isn't linked to that user).