I have recently switched from launching Emacs from the terminal (i.e. emacs --init-directory "path/to/my/init"
) to launching it from a universal keybinding (i.e. super-e
). This has had the unintended side-effect of making Magit essentially unusable, because it is no longer 'inheriting' the state of my ssh-agent
. It used to be that if I was getting Permission denied (publickey)
errors, it was a matter of a closing Emacs, ensuring my agent was running and the right keys were added to it, then relaunching Emacs from that terminal session.
However, when I launch it from the keybinding, I'm not able to get it to recognize ssh-agent
state. That it can't pick this up from a terminal session that had nothing to do with its launch isn't too surprising, but I thought that running ssh-agent
from within a term
window might address the problem. No such luck.
I suppose that daemonizing the ssh-agent
setup would get around this problem, but I'm unsure if I want to go that route. What options are available to me for configuring this within Emacs?