Skip to content

Instantly share code, notes, and snippets.

@epcim
Forked from ruben-rodriguez/GPG.txt
Last active March 24, 2017 14:40
Show Gist options
  • Save epcim/d1929745e1345574335e8edf71aa6d8b to your computer and use it in GitHub Desktop.
Save epcim/d1929745e1345574335e8edf71aa6d8b to your computer and use it in GitHub Desktop.
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:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment