https://gist.github.com/mcattarinussi/834fc4b641ff4572018d0c665e5a94d3
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "enable-ssh-support" >> ~/.gnupg/gpg-agent.conf
echo "IdentityAgent /run/user/1000/gnupg/S.gpg-agent.ssh" >> ~/.ssh/config
# Run the following to figure out what your SSH "A" key's Keygrip is:
gpg --list-keys --with-keygrip
# Add your key's keygrip to the sshcontrol file
echo A55719832AF939C531BACFFABB2A47B52FFBBF43 >> ~/.gnupg/sshcontrol
# Once you add the key to the sshcontrol file, you should see a key available to ssh-add
ssh-add -l