I am trying to automate deployment to a Google Flex App Engine in a bitbucket pipeline.

If I'm deploying via the CLI I can run something like this to run migrations after deployment:

gcloud app instances ssh --quiet --project <MYPROJECT> --version v0-0-1 --container=gaeapp --service <MYSERVICE> -- do-something-after-deploy.sh

However, this prompts me for this:

ED25519 key fingerprint is SHA256:....................
Are you sure you want to continue connecting (yes/no/[fingerprint])? 

It doesn't look like I can use ssh-keyscan to accept the host key. Is there a way to automate the execution of a script on google app engine after deployment?


1 Answer 1


If you don't want to be prompted when running a Cloud SDK command you can use the --quiet flag. As shown in the documentation:

--quiet, -q
Disable all interactive prompts when running gcloud commands. If input is required,
defaults will be used, or an error will be raised. Overrides the default
core/disable_prompts property value for this command invocation. This is equivalent to
setting the environment variable CLOUDSDK_CORE_DISABLE_PROMPTS to 1.
  • But he has already used --quiet! Mar 3, 2021 at 18:03
  • 1
    I think --quiet removes the prompts on the gcloud command, but not the ssh command that it executes on the intermediate shell.
    – mikebridge
    Mar 4, 2021 at 0:21
  • Hi Mike, I missed that. I believe you are right. However I am not sure that your approach is recommended since ssh the instance is meant for debugging purposes
    – llompalles
    Mar 4, 2021 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.