diff options
author | Alan Pearce | 2017-03-10 13:08:29 +0100 |
---|---|---|
committer | Alan Pearce | 2017-03-10 13:08:29 +0100 |
commit | 99e39b728189d9c7069de92c4cd84be1576dd377 (patch) | |
tree | 4748765493250e897c8133b0ba9f70a5f8459916 /tag-emacs | |
parent | 51eff2f0c46f9bbcb8a4ef02d434702d8f6c4053 (diff) | |
download | nixfiles-99e39b728189d9c7069de92c4cd84be1576dd377.tar.lz nixfiles-99e39b728189d9c7069de92c4cd84be1576dd377.tar.zst nixfiles-99e39b728189d9c7069de92c4cd84be1576dd377.zip |
Emacs: Check for SSH environment before starting gpg-agent
Diffstat (limited to 'tag-emacs')
-rw-r--r-- | tag-emacs/emacs.d/init.org | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index df5069cf..ca111aff 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) |