Making a GPG Key

  1. Check for already existing GPG

    gpg --list-secret-keys --keyid-format LONG
    
    
  2. Generate a key(_If not exist in #1 _)

    gpg --gen-key
    
  3. Check the list to see if key exists now

    gpg --list-secret-keys --keyid-format LONG
    
    
  4. If exists, use the KeyID such as 3EC4B8420416E86B like this, to get the GPG Key

    gpg --armor --export 3EC4B8420416E86B
    
  5. Paste the GPG key in your Github account settings

  6. Tell Git about the GPG key you’re going to use

    git config --global user.signingkey 3EC4B8420416E86B
    
What are GPG Keys?

GPG Keys allow you to sign your Github commits. They tell github and other users that it’s really you, who is committing the change. Learn more about GPG here. A much longer, and detailed, step to create GPG keys is over here.