Last active
April 14, 2023 16:03
-
-
Save jbialy/caf7e9561e363c390aa37cf37faf898d to your computer and use it in GitHub Desktop.
Quick gpg-agent configuration for SSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.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