I have a repo with a pipeline that is running a sam build process to build JS lambdas. It is essentially running the following steps with the image
public.ecr.aws/sam/build-nodejs14.x:
- npm i -g npm@latest (I had to add this, or it fails with our package-lock files)
- sam build --parallel
During the build process, it is failing because it's trying to install a private repo package (I've already added SSH keys so that one can access the other) and we're seeing the error:
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@bitbucket.org/xxx/xxxxxxxx.git
npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
If I attempt to run a git clone on the repo listed inside a pipeline step, I see the following:
+ git clone git@bitbucket.org:xxxx/xxxxxxxxxx.git
Cloning into 'xxxxxxxxxx'...
Warning: Permanently added the ECDSA host key for IP address '18.205.93.0' to the list of known hosts.
Which leads me to believe that the known-hosts isn't being correctly updated, but I can't add bitbucket.org as a known host as the UI tells me that it's managed internally.