emacs-wsl icon indicating copy to clipboard operation
emacs-wsl copied to clipboard

Add `ssh-ident` under Optional Additions

Open hubisan opened this issue 1 year ago • 0 comments

The WSL Git Credential Manager doesn't support SSH remotes.

ssh-ident can be uses as a simple way for using SSH with a credential manager. ssh-ident starts the SSH agent for a specific identity on demand (once you actually need them) and sets a customizable lifetime for that identity. Another approach is to launch the SSH agent during WSL startup. However, this prompts for a password every time, even if it's not needed.

The following configuration is necessary to enable ssh-ident to work seamlessly with Magit:

;; Integrate with ssh-ident to ask for ssh password:
  (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 [^ ]*: ?$")

hubisan avatar Jan 16 '24 09:01 hubisan