1

Recently I was looking at utilities for handling ssh-agent at an even higher level, so that entering SSH keys passphrases becomes even more seamless than with the standard ssh-agent utility.

One such utility is ssh-ident, the one I chose as the best solution for my workflow. I have configured my system paths so that Git uses ssh-ident instead of regular ssh, which is what the utility requires in order to work.

However, whenever I have to enter an SSH key passphrase through Magit, I get stuck because Magit does not parse the prompt that this tool issues. I would like to know if it is possible to fix this issue (or, in general, of any solution to have ssh-ident work w/ Magit).

Thank you for your help!

1 Answer 1

3

Update:

Magit now supports prompting for the password in the way that ssh-ident asks for it by default, via the variable magit-process-password-prompt-regexps. In my case, I had to adjust it as follows:

;; Integrate with ssh-ident
(add-to-list 'magit-process-password-prompt-regexps
             "^\\(Enter \\)?[Pp]assphrase for [^ ]*: ?$")
(add-to-list 'magit-process-password-prompt-regexps
             "^Bad passphrase, try again for [^ ]*: ?$")

Old:

I created the emacs-ssh-ident minor mode that adds a hook to Magit when it needs credentials and gets user input for ssh-ident.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.