Skip to content

Instantly share code, notes, and snippets.

@gauravchl
Last active August 3, 2019 22:42
Show Gist options
  • Save gauravchl/6b056128bfa962a52f3ddf3b15336acd to your computer and use it in GitHub Desktop.
Save gauravchl/6b056128bfa962a52f3ddf3b15336acd to your computer and use it in GitHub Desktop.
gpg installation osx

Setup new GPG key

  1. Generate key

  2. List keys and copy key ID

    • gpg --list-secret-keys --keyid-format LONG
    • sec 4096R/3AA5C34371567BD2 2016-03-10
    • key ID is 3AA5C34371567BD2
  3. Copy the GPG Key

    • gpg --armor --export 3AA5C34371567BD2
  4. Save copied key to GitHub account

  5. Update .gitconfig

    [user]
      email = gauravchl@users.noreply.github.com
      name = Gaurav Chikhale
      signingkey = 3AA5C34371567BD2
    [commit]
      gpgsign = true
    [gpg]
      program = /usr/local/bin/gpg
    
  6. Install pinentry-mac brew install pinentry-mac

  7. Update ~/.gnupg/gpg-agent.conf

    pinentry-program /usr/local/bin/pinentry-mac
    
  8. Kill gpg agent killall gpg-agent

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