Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ssh keys with passphrase applied #55

Closed
legrego opened this issue Mar 8, 2018 · 3 comments
Closed

Support ssh keys with passphrase applied #55

legrego opened this issue Mar 8, 2018 · 3 comments

Comments

@legrego
Copy link

legrego commented Mar 8, 2018

backport does not appear to support ssh keys that are protected by a passphrase. The process hangs indefinitely when trying to clone the repository. If I recreate my key without a passphrase applied, then the backport works perfectly.

I'm guessing that the git client is waiting for the passphrase to be entered via stdin, but backport doesn't expose/allow that to be entered via command line. It would be nice if we could enable this support, so users can protect their keys if they so choose.

System Config:

  • OS: macOS High Sierra 10.13.3
  • Git Client: 2.14.3 (Apple Git-98)
@sorenlouv
Copy link
Owner

sorenlouv commented Mar 9, 2018

This is a good point. I was looking at ways to capture interaction while working on #45 but didn't find any good way of doing it.

I would like it if backport could maintain control of the flow, so a password prompt doesn't suddenly appear (it also messes with the loading spinners).
However, it seems like I can't simply capture the output from an interactive shell like ssh with Node's child_process, and I need to use something like pty.js instead.

A workaround for you is to add your ssh key to the ssh-agent

@legrego
Copy link
Author

legrego commented Mar 9, 2018

Great idea about using the ssh-agent. I completely forgot about that option. Thanks!

@sorenlouv
Copy link
Owner

Good to hear the workaround solved it for now. Closing this for now in favor of #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants