Skip to content

Instantly share code, notes, and snippets.

@h3ssan
Last active May 10, 2022 02:46
Show Gist options
  • Save h3ssan/b375e241941848cdfd13ecfd82304d86 to your computer and use it in GitHub Desktop.
Save h3ssan/b375e241941848cdfd13ecfd82304d86 to your computer and use it in GitHub Desktop.
Sign git commits with PGP key.
  1. git config --global commit.gpgSign true
  2. git config --global user.email email
  3. git config --global user.name name

Get the RSA/[A-Z0-9]+ string

  1. gpg --list-secret-keys --keyid-format=long

Use the RSA/[A-Z0-9]+ string

  1. git config --global user.signingkey RSA/[A-Z0-9]+
  2. echo 'export GPG_TTY=$(tty)' >> ~/.bashrc
@h3ssan
Copy link
Author

h3ssan commented Jan 30, 2022

Note:
To change the password prompt, in Gentoo Linux:
sudo eselect pinentry list
and select the GUI one.

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