From 5c5304de028ff701fed0c050fd15b7e5b67db177 Mon Sep 17 00:00:00 2001 From: Chen Bin Date: Fri, 15 Sep 2023 21:22:51 +1000 Subject: [PATCH] emacs know ssh-agent --- lisp/init-essential.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/init-essential.el b/lisp/init-essential.el index ad821cdeb..933d695f8 100644 --- a/lisp/init-essential.el +++ b/lisp/init-essential.el @@ -291,5 +291,12 @@ If OTHER-SOURCE is 2, get keyword from `kill-ring'." ;; better performance (setq show-paren-delay 0.5)) +;; Make emacs know ssh-agent +;; @see https://emacs.stackexchange.com/questions/17866/magit-how-to-use-systems-ssh-agent-and-dont-ask-for-password +(my-run-with-idle-timer 2 + (lambda () + (exec-path-from-shell-copy-env "SSH_AGENT_PID") + (exec-path-from-shell-copy-env "SSH_AUTH_SOCK"))) + (provide 'init-essential) ;;; init-essential.el ends here