git config --global commit.gpgSign true
git config --global user.email email
git config --global user.name name
Get the RSA/[A-Z0-9]+ string
gpg --list-secret-keys --keyid-format=long
Use the RSA/[A-Z0-9]+ string
git config --global user.signingkey RSA/[A-Z0-9]+
echo 'export GPG_TTY=$(tty)' >> ~/.bashrc
Note:
To change the password prompt, in Gentoo Linux:
sudo eselect pinentry list
and select the GUI one.