HotCodePush

signing-key

Generate a key pair, add an existing key, list fingerprints, show a public key and remove a key after rotation with hotcodepush signing-key.

hotcodepush signing-key manages an app's signing keys: an RSA key pair whose public half the app registers and whose private half signs every upload. Sign your bundles is the guide, from the first key to a rotation. The verbs keep publicKeys in hotcodepush.json in step with the app.

create

Generate a key pair and add its public key to the app, the private key written to a new file on this machine: from then on the app releases only signed bundles. The private key never prints and the CLI keeps no copy. Keep the file out of version control.

OptionTypeDescription
--private-key-path <file>stringThe file to write the private key to, which must not exist; hotcodepush-private-key.pem in the current directory by default.
hotcodepush signing-key create
hotcodepush signing-key create --app "My App" --private-key-path my-app-private-key.pem --json

add

Add the public key of a key pair you already have, from its private key file, which stays where it is: from then on the app releases only signed bundles. An RSA key of at least 2,048 bits passes, a CodePush app's key among them.

OptionTypeDescription
--private-key-path <file>stringThe private key file of the pair, a PEM of PKCS #8 or PKCS #1, read on this machine. Its public key is derived from it.
hotcodepush signing-key add --private-key-path my-app-private-key.pem
hotcodepush signing-key add --app "My App" --private-key-path my-app-private-key.pem --json

list

List the app's signing keys, newest first, with the fingerprint a signature names.

OptionTypeDescription
--limit <count>numberHow many to list, at most 100; 50 by default.
--offset <count>numberHow many to skip: the offset the previous page ended with.
hotcodepush signing-key list
hotcodepush signing-key list --app "My App" --json

get

Print a signing key with its public key, the value hotcodepush.json's publicKeys lists. The output names the id, the key id, the public key and the creation time.

OptionTypeDescription
--signing-key <id|fingerprint>stringThe signing key, by id or key id.
hotcodepush signing-key get --signing-key sha256:9f2c4e1ab07d
hotcodepush signing-key get --signing-key 3b1f8e7a-5c2d-4f6b-9a0e-7d4c1b2a3f5e --json

delete

Unregister a signing key after the store release that stopped trusting it. Confirms once (--yes in a script). The key leaves publicKeys in hotcodepush.json too, and the private key file is not touched.

OptionTypeDescription
--signing-key <id|fingerprint>stringThe signing key, by id or key id.
hotcodepush signing-key delete --signing-key sha256:9f2c4e1ab07d
hotcodepush signing-key delete --signing-key 3b1f8e7a-5c2d-4f6b-9a0e-7d4c1b2a3f5e --yes --json

Last updated on

On this page