brew install gnugp
- might need to comment out line 223 of
~/.gnupg/gpg.conf
gpg --gen-key
generate keygpg --list-key
show key lists
see: http://enter2exit.wordpress.com/2011/03/01/managing-passwords-with-vimgpggit/ http://www.madboa.com/geek/gpg-quickstart/
UPDATE November 8, 2017:
Later versions of GPG Keychain really messed up the workflow. It started by not recognizing the secret key location directive, meaning I was required to import the key to the keychain. Furthur updates to the GPG Keychain app began saving the key password to OSX keychain by default, eventually, not even asking! Frustration town.
I uninstalled GPG Keychain.
Then, brew install gnupg
, inspired by this: http://blog.ghostinthemachines.com/2015/03/01/how-to-use-gpg-command-line/
I still needed to import on the command line: gpg --import /Volumes/sdcard/gnupg/secring.gpg
.
I edited ~/.gnupg/gpg-agent.conf
, setting both default-cache-ttl
and max-cache-ttl
to 0
.
Finally, restart gpg-agent
with gpgconf --kill gpg-agent
.
Next time I edited the file, I was prompted for the key passphrase. And everytime afterward!
Now, hopefully, gnupg will remain consistent.
UPDATE December 11, 2019
- download gnupg to `~/.vim/plugins/gnupg.vim
alias vd='vim -n -i "NONE" "+set filetype=yaml"'
- @TODO use correct vim filetype for pretty formatting
- list keys
gpg --list-secret-keys
- export key
gpg --export-secret-keys {the id from the list} > my-key.asc
- transfer key to new machine
- import key
gpg --import my-key.asc
- delete public and private key
gpg --delete-keys
andgpg --delete-secret-keys