Preface
you may come across the situation, were you are not quite sure if your ssh-agent is using your gpg-agent or not. Here are two commands to check if evertyhing is correctly set up or not.
Example
- Check environment variables:
echo $SSH_AUTH_SOCK
- If the path contains
gpg-agent, SSH is using the GPG agent.
If the output contains a path which includes gpg-agent, then ssh is using the gpg-agent.
- Check if the gpg-agent daemon is running:
gpg-agent --daemongpg-agent: a gpg-agent is already running - not starting a new one
- List all your your current public keys:
ssh-add -L