I'm using some private Github repositories as dependencies for my node app:
"dependencies": {
"lib1": "git+ssh://git@github.com/org/repo.git",
"lib2": "git+ssh://git@github.com/org/repo2.git",
}
For authentication with Github, I've set up a private key on GitHub and configured the SSH-Agent as a Build Feature.
The node app itself is also a private Github repository. Authentication when fetching the node app code from Github works fine, but not for any of the dependencies when running npm install
:
[Step 2/4] npm ERR! Linux 4.4.11-23.53.amzn1.x86_64
[12:34:48] [Step 2/4] npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
[12:34:48] [Step 2/4] npm ERR! node v6.2.0
[12:34:48] [Step 2/4] npm ERR! npm v3.8.9
[12:34:48] [Step 2/4] npm ERR! code 128
[12:34:48] [Step 2/4]
[12:34:48] [Step 2/4] npm ERR! Command failed: git clone --template=/home/ec2-user/.npm/_git-remotes/_templates --mirror ssh://git@github.com/org/repo.git /home/ec2-user/.npm/_git-remotes/git-ssh-git-github-com-org-repo-git-0820d508
[12:34:48] [Step 2/4] npm ERR! Cloning into bare repository '/home/ec2-user/.npm/_git-remotes/git-ssh-git-github-com-org-repo-git-0820d508'...
[12:34:48] [Step 2/4] npm ERR! Host key verification failed.
[12:34:48] [Step 2/4] npm ERR! fatal: Could not read from remote repository.
[12:34:48] [Step 2/4] npm ERR!
[12:34:48] [Step 2/4] npm ERR! Please make sure you have the correct access rights
[12:34:48] [Step 2/4] npm ERR! and the repository exists.
Step 1/4 is actually a check if the SSH-Agent is working by running ssh-add -l
. It prints the fingerprint of the correct key, which is registered to Github.
Any ideas how to get this to work? I'd rather not set up SSH keys manually on each agent, as this would defeat the purpose of any SSH configuration on the web interface.
I'm using node v6.2.0, npm 3.8.9 and TeamCity 10.0.3 (build 42434).