I have a private repo that I want to install in my package.json file.
Here are a few solutions:
Add an entry to your
~/.ssh/config. For example:
Host bitbucket.org IdentityFile ~/.ssh/bitbucket_key IdentitiesOnly yes
ssh-agent and add your key to the agent instance beforehand.
Use something like ssh-ident for choosing ssh agents and identities dynamically based on the current working directory or arguments passed to ssh-ident. As their readme states, you would typically alias ssh-ident to
ssh so that it's automatically used everywhere.