gpg --gen-key
gpg --list-keys
gpg -k
Above command will show the key from the public keyring. To view the secret key ring, use- gpg --list-secret-keys (OR gpg -K)
To send your public key to a correspondent you must first export it.
gpg --output <public-gpg-key.gpg> --armor --export [email protected]
gpg --armor --export [email protected] > gpg-pubkey-himanshu.asc
gpg --import private_key.asc
gpg --list-secret-keys --keyid-format LONG
gpg --delete-secret-key <key>
gpg --edit-key <key>
git config --global user.signingkey <key>
git config --global commit.gpgsign true
Edit .bash_profile
export GPG_TTY=$(tty)
Copy public key https://keybase.io/akiyoshi/key.asc to a new gpg key on github
ref:
- http://www.ianatkinson.net/computing/gnupg.htm
- http://www.madboa.com/geek/gpg-quickstart/
- https://www.gnupg.org/gph/en/manual/x56.html
- http://aplawrence.com/Basics/gpg.html
- http://fedoraproject.org/wiki/Creating_GPG_Keys#Making_Your_Public_Key_Available