Issue
I have configured SSH key and added it to my GitHub account. Then I have cloned private repo with ssh, and tried to install node modules (some of them are private):
"package1": "git+ssh://[email protected]:company/package1.git#0.0.2",
"package2": "git+ssh://[email protected]:company/package2.git#1.1.1",
and it fails with
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
Solution
It looks odd, but adding key to ssh-agent one more time helped:
ssh-add ~/.ssh/id_rsa
Anyway, how i could clone repo if key was not added to agent?
Answered By - domanskyi