generated from ellisonleao/nvim-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 7
GPG Singing and SSH Signing
SuperBo edited this page May 25, 2024
·
5 revisions
In order to sign commit with git, you have 2 options, using GPG key and SSH key.
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"
Install GPGMe guide
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
Download and install GPG4Win