Skip to content

Instantly share code, notes, and snippets.

@jbialy
Last active April 14, 2023 16:03
Show Gist options
  • Save jbialy/caf7e9561e363c390aa37cf37faf898d to your computer and use it in GitHub Desktop.
Save jbialy/caf7e9561e363c390aa37cf37faf898d to your computer and use it in GitHub Desktop.
Quick gpg-agent configuration for SSH
# ~/.gnupg/gpg-agent.conf
default-cache-ttl 3600
default-cache-ttl-ssh 3600
max-cache-ttl 7200
max-cache-ttl-ssh 7200
enable-ssh-support
# reset gpg-agent
gpg-connect-agent killagent /bye
gpg-connect-agent updatestartuptty /bye
# edit ~/.zshrc
echo 'export GPG_TTY=$(tty)' >> ~/.zshrc
echo 'export SSH_AUTH_SOCK=\${HOME}/.gnupg/S.gpg-agent.ssh' >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment