generated from ellisonleao/nvim-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 8
GPG Singing and SSH Signing
SuperBo edited this page Jun 28, 2024
·
5 revisions
In order to sign commit with git, you have 2 options, using GPG key or SSH key. GPG key requires you have GnuPG setup while SSH Key requires you have OpenSSH setup. Usually, setting up OpenSSH is more convenient.
Ensure you have OpenSSH installed. Then configure your repo as following.
git config commit.gpgsign true
git config gpg.format ssh
# you must set signingkey for ssh signing to work.
git config user.signingkey ~/.ssh/id_ed25519.pub
Install openssh guide
- Arch Linux:
sudo pacman -S openssh
- Ubuntu:
sudo apt-get install openssh-client
- Fedora:
sudo dnf install openssh-clients
- Mac:
brew install openssh
Ensure you have GPGme installed. And install a GUI pinentry program, so that it doesn't clear terminal buffer of Neovim GUI. Then configure your repo as folowing
git config commit.gpgsign true
# reset gpg format
git config --unset gpg.format
# Optionally set your gpg key
git config user.signingkey "KeyID"
sudo pacman -S gpgme
brew install gpgme pinentry-mac
# Set Pinentry
echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf
sudo apt-get install libgpgme11
# Use gnome3 for pinentry
sudo apt-get install pinentry-gnome3
echo "pinentry-program $(which pinentry-gnome3)" >> ~/.gnupg/gpg-agent.conf
# Usse Qt for pinentry
sudo apt-get install pinentry-qt
echo "pinentry-program $(which pinentry-qt)" >> ~/.gnupg/gpg-agent.conf
Download and install GPG4Win
If you install GPGme to a directory that isn't included in system path, you have to configure it manually for Fugit2 to load it. Configure it as following
-- Fugit2 setup table
{
gpgme_path = "<path/to/library/dir>"
}