I have an NPM package hosted on a private Bitbucket git repo (not in the official NPM registry).
I have this in my package.json, under the "dependencies" key:
"a-private-package" git+ssh://[email protected]:myusername/a-private-package.git
It works when I run npm install
locally as my SSH keys are used.
But when I use gcloud app deploy
to deploy to the app engine standard environment for node, I get a Host key verification failed
from Google Cloud Build.
I have tried:
Adding a custom SSH key to Cloud Build.
https://cloud.google.com/cloud-build/docs/access-private-github-repos
Issue: No access to cloudbuild.yaml
for GAE standard; cannot tell git to use the SSH key.
Adding my private git repo to Google Sources.
Issue: No access to cloudbuild.yaml
for GAE standard; cannot tell git to use the SSH key.
npm pack; npm install
Issue: Does not keep repo history/URL.
Is it actually possible?
gcloud app deploy
from the build, which would start another fresh build without the SSH key installed in the layers before it? – Singultusgcloud app deploy
after he defines thecloudbuild.yaml
. I see you are obtaining aHost key verification failed
error from Cloud Build and adding the SSH keys to the .yaml file could fix this but you also say you can not modify thecloudbuild.yaml
. Why are you not able to modify thecloudbuild.yaml
? – Officiousgcloud app deploy
will trigger a new fresh build (from the first build), with an emptycloudbuild.yaml
. I think this is the core issue (that you cannot customize thecloudbuild.yaml
thatgcloud app deploy
uses). If you view the comments of that article, someone else is having this same issue. Thanks for the link though. – Singultus