Permission denied for git dependencies in package.json

node.js

Solution

I should run `npm install` without `sudo`.

If can not, then change permissions for node.js apps folder:

sudo chown -R `whoami` ~/pathToAll/node/apps.

So git ssh dependencies work well in package.json

Problem

I try setup git dependencies in package.json: ``` "dependencies": { "myLib": "git+ssh://git@domain.com:user/myLib.git" } ``` When I do `sudo npm install` I got errors: ``` Warning: Permanently added the RSA host key for IP address 'myIp' to the list of known hosts. Permission denied (publickey). ``` Allthough I can clone successfully the same lib to that machine: ``` git clone git@domain.com:user/myLib.git ``` So I have valid ssh keys. My OS is OSX but I have the same problem on Linux.

Original source