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

FR: Support SSH interactive login #5649

Open
bsdinis opened this issue Feb 10, 2025 · 8 comments
Open

FR: Support SSH interactive login #5649

bsdinis opened this issue Feb 10, 2025 · 8 comments

Comments

@bsdinis
Copy link
Contributor

bsdinis commented Feb 10, 2025

Is your feature request related to a problem? Please describe.
When doing authentication with Github or having password protected keys, jj does not support receiving these inputs from the user.
Namely, with git.subprocess = true, git is called without stdin open.

Describe the solution you'd like
Have a way to pipe the authentication information back to the user.

Describe alternatives you've considered
The alternatives right now it to not do interactive login. For people that have password protected keys, this is a no-go

@yuja
Copy link
Contributor

yuja commented Feb 11, 2025

Is that platform-dependent issue? On Linux, ssh can obtain tty even if stdin is redirected.

@bsdinis
Copy link
Contributor Author

bsdinis commented Feb 11, 2025

Yes, my understanding is that this is a Windows issue that affects both subprocessing and git2

@yuja
Copy link
Contributor

yuja commented Feb 11, 2025

Hmm, then I have no idea how we can fix the problem cleanly. Suppose stdin and stdout of the underlying ssh process are piped, the ssh process might detect tty (or equivalent) through stderr on Windows. However, we need to pipe stderr of the parent git process in order to parse the error message.

If tty is inaccessible, ssh would use ssh-askpass program to open GUI prompt, which wouldn't be available on Windows?

@bsdinis
Copy link
Contributor Author

bsdinis commented Feb 11, 2025

The thing here that's confusing to me is the fact that git2 is also not working...

@emilazy
Copy link
Contributor

emilazy commented Feb 11, 2025

Perhaps a bisect is in order? (But it might just point to c393555, I suppose.)

@yuja
Copy link
Contributor

yuja commented Feb 11, 2025

The thing here that's confusing to me is the fact that git2 is also not working...

Oh, you mean it was working before but isn't now? iirc, git2 doesn't support interactive SSH prompt.

@bsdinis
Copy link
Contributor Author

bsdinis commented Feb 11, 2025

Perhaps a bisect is in order? (But it might just point to c393555, I suppose.)

My main problem is that I can't repro locally, it was reported on discord.
Tbf, I don't think the subprocessing code is at blame. I suspect it was one of the refactorings after.
I'm going to work on trying to find a way to repro

@bsdinis
Copy link
Contributor Author

bsdinis commented Feb 11, 2025

Also, I'm not even sure that the issue is an interactive login anymore. Going to try to figure it out

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

3 participants