From 6c18587fcf941102321bb6fc49e538992a8fc1b1 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 3 May 2020 13:21:33 -0500 Subject: [PATCH] zshrc: Launch gpg-agent I like to use `gpg-agent` as my SSH agent now. This makes it possible to use hardware keys (Yubikey, and hopefully soon Solo), and helps keep the keys more secure by periodically locking them and requiring the password to unlock them again. Occasionally, `gpg-agent` gets in a weird state where it stops responding. I usually fix this with: echo KILLAGENT | gpg-connect-agent gpg-connect-agent /bye gpg-connect-agent updatestartuptty /bye --- .zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.zshrc b/.zshrc index 25b4864..09dad96 100644 --- a/.zshrc +++ b/.zshrc @@ -67,3 +67,6 @@ centos|redhat|rhel) prompt redhat ;; esac + +gpg-connect-agent /bye +export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"