4,348
edits
→Cookbook: add many more example commands |
→Troubleshooting: gpg-connect-agent RESET /bye |
||
(9 intermediate revisions by the same user not shown) | |||
Line 56: | Line 56: | ||
Command> check | Command> check | ||
// change passphrase | |||
$ gpg --edit-key didi | |||
Command> passwd | |||
// save | |||
Command> save | |||
// encrypt [and compress] a document | // encrypt [and compress] a document | ||
Line 82: | Line 87: | ||
$ gpg --verify doc.sig doc | $ gpg --verify doc.sig doc | ||
</source> | </source> | ||
== Key management == | == Key management == | ||
Line 97: | Line 101: | ||
: update expiration time | : update expiration time | ||
in order to import a private key on a different machine. | |||
<source lang="console"> | |||
// export the key using an ASCII-armored format | |||
$ gpg --export-secret-keys -a mhan@mhan.net > pkey.asc | |||
// copy to a target machine, and then on the target machine | |||
$ gpg --import pkey.asc | |||
</source> | |||
Note: if key already existed, you may need to delete 'em via '''--delete-keys''' or '''--delete-secret-keys''' | |||
== Key distribution == | == Key distribution == | ||
Line 106: | Line 122: | ||
// send a key | // send a key | ||
$ gpg --keyserver certserver.pgp.com --send-key mhan | $ gpg --keyserver certserver.pgp.com --send-key mhan | ||
</source> | |||
= Configuration = | |||
Change default cipher by adding the following to <span>~/.gnupg/gpg.conf</span class="package"> | |||
<source lang="console"> | |||
cipher-algo AES256 | |||
</source> | |||
= Troubleshooting = | |||
Kill any running agents | |||
<source lang="console"> | |||
$ gpgconf --kill gpg-agent | |||
</source> | </source> | ||
Reset agent as a user | |||
<source lang="console"> | |||
$ gpg-connect-agent RESET /bye | |||
</source> | </source> | ||
If you get ''Inappropriate ioctl for device'' you can add '''export GPG_TTY=$(tty)''' to either ~/.bashrc or ~/.profile (or ~/.bash_profile). | |||
= Keyservers = | = Keyservers = | ||
Line 123: | Line 161: | ||
* http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/ | * http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/ | ||
* [https://eligible.com/blog/commit-signing-with-git-hub-keybase-and-gpg/ Commit Signing With Git, Hub, Keybase, and GPG] |