For GPG versions 2.x only.
List keys
List public keys
Cheat Sheet Excerpt “-v, -version: Prints the current version of npm you are using-h, -help: Quick help on the specified command-l: Displays full usage info. Npx command: Runs an arbitrary command from an npm module (either one installed locally, or fetched remotely). Ionic Commands Cheat Sheet Installing Ionic -Download and install Node.js-Install Ionic and Cordova:npm install -g cordova ionic Generating a New Ionic Application -Basic.
List all secret keys
List public or secret keys, but show subkey fingerprints as well
Npm Commands Cheat Sheet Download
The key ring location is normally shown on the first line on stdout.
Use different key ring
List keys but use a different home directory for one command only
Set different home directory for session
Generate keys
Generate key pair
Exporting keys
Export single public key or secret key, useful for backing up keys
Export all keys
Exported secret keys are protected with current secret key passphrase.
Importing keys
List contents of key file without importing it
Verbose option to see fingerprint or both fingerprint/signatures too
Import keys, merging into current key ring
Signing a key
View the fingerprint of a key, after confirming the key is authentic, sign the key.
Or via the key editor
Optionally, export the key again and return to user
Signing a key will automatically set the key's trust level to full.
If you local sign a key, the exported key to others doesn't contain the signatures, the signature is only valid to you
Edit key trust
The trust level you enter is based on:
Use ultimate only for keys you've generated yourself. Signing a key will automatically set the key's trust level to full.
Generate a revocation certificate
Renew an expired (sub)key
To change the expiry of a key
Then export the new key for distribution, and generate a new revocation certificate for safekeeping. The secret key doesn't change.
Encryption
Encrypt file to one recipient key. This will write to a default filename, in this case file.txt.gpg
Sign and encrypt a file
Encrypt to multiple recipients
Encrypt and specify output file
Encryption uses compression by default. To disable, use the option -z 0
. This will speed up the process if encrypting a large file which is already compressed.
Encrypt contents from standard input
Symmetrically encrypt a file using a passphrase
Create or verify signature
Yarn Cheat Sheet
Sign file without encrypting, using a detached signature. This will write to a default file file.txt.asc
in the example below.
But with clear signed attached signature
Sign using a non default secret key. Useful if you have multiple secret keys on your key ring.
Verify a clearsigned or dettached signature
Decryption
List recipients of a encrypted file
Decrypt a file to user defined output filename
Decrypt a file using default file name, e.g file.txt.gpg
decrypts to file.txt
Batch encrypt and decrypt
Npm Install Syntax
Encrypt all *.jpg
files in the current directory to two recipients, with no compression
Decrypt all *.gpg
files in current directory. If --output
is not used, it will write file.txt.gpg
to file.txt
Do the same using a shell script
Decrypt using passphrase from standard input