gcloud container binauthz attestors public-keys add --attestor=ATTESTOR (--pgp-public-key-file=PATH_TO_FILE | (--keyversion=KEYVERSION : --keyversion-key=KEYVERSION_KEY --keyversion-keyring=KEYVERSION_KEYRING --keyversion-location=KEYVERSION_LOCATION --keyversion-project=KEYVERSION_PROJECT) | --pkix-public-key-algorithm=PKIX_PUBLIC_KEY_ALGORITHM --pkix-public-key-file=PATH_TO_FILE) [--comment=COMMENT] [--public-key-id-override=PUBLIC_KEY_ID_OVERRIDE] [GCLOUD_WIDE_FLAG …]
my_attestor:
gcloud container binauthz attestors public-keys add --attestor=my_attestor --keyversion-project=foo --keyversion-location=us-west1 --keyversion-keyring=aring --keyversion-key=akey --keyversion=1
To add a new PGP public key to an existing Attestor my_attestor:
gcloud container binauthz attestors public-keys add --attestor=my_attestor --pgp-public-key-file=my_key.pub
To set the project attribute:
--attestor on the command line with a fully
specified name;
--project on the command line;
core/project.
--attestor=ATTESTORname attribute:
--attestor on the command line.
--pgp-public-key-file=PATH_TO_FILE--keyversion=KEYVERSION
To set the version attribute:
--keyversion on the command line.
--keyversion-key=KEYVERSION_KEYkey attribute:
--keyversion on the command line with a fully
specified name;
--keyversion-key on the command line.
--keyversion-keyring=KEYVERSION_KEYRINGkeyring attribute:
--keyversion on the command line with a fully
specified name;
--keyversion-keyring on the command line.
--keyversion-location=KEYVERSION_LOCATIONlocation attribute:
--keyversion on the command line with a fully
specified name;
--keyversion-location on the command line.
--keyversion-project=KEYVERSION_PROJECTproject attribute:
--keyversion on the command line with a fully
specified name;
--keyversion-project on the command line;
--project on the command line;
core/project.
--pkix-public-key-algorithm=PKIX_PUBLIC_KEY_ALGORITHMPKIX_PUBLIC_KEY_ALGORITHM must be one of:
ec-sign-p256-sha256, ec-sign-p384-sha384,
ec-sign-p521-sha512, ecdsa-p256-sha256,
ecdsa-p384-sha384, ecdsa-p521-sha512,
ml-dsa-65, rsa-pss-2048-sha256,
rsa-pss-3072-sha256, rsa-pss-4096-sha256,
rsa-pss-4096-sha512, rsa-sign-pkcs1-2048-sha256,
rsa-sign-pkcs1-3072-sha256,
rsa-sign-pkcs1-4096-sha256,
rsa-sign-pkcs1-4096-sha512, rsa-sign-pss-2048-sha256,
rsa-sign-pss-3072-sha256, rsa-sign-pss-4096-sha256,
rsa-sign-pss-4096-sha512.
This flag argument must be specified if any of the other arguments in this group
are specified.
--pkix-public-key-file=PATH_TO_FILE--comment=COMMENT--public-key-id-override=PUBLIC_KEY_ID_OVERRIDE--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha container binauthz attestors public-keys addgcloud beta container binauthz attestors public-keys add
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-16 UTC.