all repos — nixfiles @ 99e39b728189d9c7069de92c4cd84be1576dd377

System and user configuration, managed by nix and home-manager

Emacs: Check for SSH environment before starting gpg-agent

Alan Pearce
commit

99e39b728189d9c7069de92c4cd84be1576dd377

parent

51eff2f0c46f9bbcb8a4ef02d434702d8f6c4053

1 file changed, 2 insertions(+), 1 deletion(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -1289,7 +1289,8 @@ (defun load-private-data ()
(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)