cub worker key add
cub worker key add
Register a public key for a worker
Synopsis
Register a public key against a worker's identity.
Either generate a keypair here with --generate, which stores the private key locally and registers the public half, or register a public key you already have with --public-key.
--generate takes an alias or a path. A bare name is an alias stored under
~/.confighub/keys, which is what "cub auth login --private-key=
The private key never reaches ConfigHub in either case.
Examples:
# Generate a keypair for a worker and register the public half
cub worker key add my-worker --generate my-worker
# Register a public key you already have
cub worker key add my-worker --public-key ./worker.pub.jwk
# Record which host holds the private key
cub worker key add my-worker --generate ci --description "CI runner, us-east"
cub worker key add <worker> [flags]
Options
--description string note recording which host or pipeline holds the private key
--generate string generate an Ed25519 keypair, store the private key under this alias (or path), and register the public half
-h, --help help for add
--public-key string file holding the public key as a JWK, or - for stdin
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
--space string space ID to perform command on
SEE ALSO
- cub worker key - Manage the keys a worker authenticates with