Created
May 21, 2021 23:25
-
-
Save gtmanfred/094a1be6a382bef0ac748619007d4f7f to your computer and use it in GitHub Desktop.
Gnupg setup
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
enable-ssh-support | |
default-cache-ttl 60 | |
max-cache-ttl 120 | |
pinentry-program /usr/local/bin/pinentry-mac |
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
set -gx AGENT_SOCK (gpgconf --list-dirs | awk -F':' '/agent-socket/ {print $2}') | |
if not test -S $AGENT_SOCK | |
gpg-agent --daemon --use-standard-socket | |
end | |
set -gx GPG_TTY $TTY | |
# Set SSH to use gpg-agent if it's enabled | |
set -gx GNUPGCONFIG "$HOME/.gnupg/gpg-agent.conf" | |
if test -r $GNUPGCONFIG; and command grep -q enable-ssh-support "$GNUPGCONFIG" | |
set -gx SSH_AUTH_SOCK "$AGENT_SOCK.ssh" | |
set -e SSH_AGENT_PID | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment