From 99e39b728189d9c7069de92c4cd84be1576dd377 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 10 Mar 2017 13:08:29 +0100 Subject: Emacs: Check for SSH environment before starting gpg-agent --- tag-emacs/emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tag-emacs/emacs.d') diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index df5069c..ca111af 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1289,7 +1289,8 @@ rather useful. (interactive) (if (not have-private-key) (message "ERROR: Private GPG key not found") - (unless (getenv "GPG_AGENT_INFO") + (unless (or (getenv "GPG_AGENT_INFO") + (getenv "SSH_AUTH_SOCK")) (start-process "gpg-agent" nil "gpg-agent" "--daemon") (setenv "SSH_AUTH_SOCK" gpg-agent-ssh-sock)) (setq password-cache-expiry nil) -- cgit 1.4.1