I'm trying to set up a build plan where the first step is to run npm install. One of the npm dependencies is a Bitbucket repository that is accessed via ssh. I've added the correct ssh private key as a shared credential in Bamboo cloud and added the public key to a Bitbucket account with access to the repo. When running the build plan it fails when trying to clone the repository.
error 29-Oct-2015 15:53:14 npm ERR! Host key verification failed. error 29-Oct-2015 15:53:14 npm ERR! fatal: Could not read from remote repository. error 29-Oct-2015 15:53:14 npm ERR! error 29-Oct-2015 15:53:14 npm ERR! Please make sure you have the correct access rights error 29-Oct-2015 15:53:14 npm ERR! and the repository exists.
Is there anything else that needs to be done for the ssh authentication to work?
This is a pretty old question regarding Bamboo Cloud but for anyone who's interested in the same subject for Bamboo Server, I've got a few points and suggestions to share regarding Git Credentials and NPM via Bamboo.
When you invoke NPM through Bamboo, NPM and Git will be run as the same user that runs the Bamboo (or Bamboo remote agent) process and will use the SSH key from the environment (e.g. ~/.ssh/id_rsa) for that user. Basically, authentication is purely handled at the environment level, the same as it would by command-line (not by Bamboo).
The same credentials you use to checkout the repository that contains your NPM project via Bamboo, will not be available within the build or to NPM to checkout dependencies.
Our general recommendation (using Bitbucket Server as an example) is to:
Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs