Skip to content

Commit

Permalink
emacs know ssh-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Sep 15, 2023
1 parent 083f000 commit 0f10f7f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lisp/init-essential.el
Original file line number Diff line number Diff line change
Expand Up @@ -291,5 +291,13 @@ 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 ()
(setq exec-path-from-shell-check-startup-files nil)
(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

0 comments on commit 0f10f7f

Please sign in to comment.