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.
| Option | Type | Description |
|---|---|---|
--private-key-path <file> | string | The 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 --jsonadd
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.
| Option | Type | Description |
|---|---|---|
--private-key-path <file> | string | The 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 --jsonlist
List the app's signing keys, newest first, with the fingerprint a signature names.
| Option | Type | Description |
|---|---|---|
--limit <count> | number | How many to list, at most 100; 50 by default. |
--offset <count> | number | How many to skip: the offset the previous page ended with. |
hotcodepush signing-key list
hotcodepush signing-key list --app "My App" --jsonget
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.
| Option | Type | Description |
|---|---|---|
--signing-key <id|fingerprint> | string | The 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 --jsondelete
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.
| Option | Type | Description |
|---|---|---|
--signing-key <id|fingerprint> | string | The 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 --jsonLast updated on