epcim
3/24/2017 - 2:20 PM

GPG & github gpg sign

GPG & github gpg sign

create

gpg --gen-key 

list

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)

export

To send your public key to a correspondent you must first export it.

gpg --output <public-gpg-key.gpg> --armor --export alice@cyb.org
gpg --armor --export himanshu.prakash02@barclays.com > gpg-pubkey-himanshu.asc

import

gpg --import private_key.asc

other

gpg --list-secret-keys --keyid-format LONG
gpg --delete-secret-key <key>
gpg --edit-key <key>

config

git config --global user.signingkey <key>
git config --global commit.gpgsign true

usage

Edit .bash_profile
export GPG_TTY=$(tty)

Copy public key https://keybase.io/akiyoshi/key.asc to a new gpg key on github

ref: