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
SSH prompts not showing up on Windows #13050
Comments
Hey @the-real-nps! 👋 Sorry to hear it doesn't work for you 😞 Could you share the app logs so I can take a look and see what's wrong? This has worked in my multiple tests on Windows and macOS, so I wonder what could be different here. You can get the logs from |
Unfortunately, I can't. It's an enterprise github and our company's policy prevents me from sharing stuff like that. But I can show you the error log:
Nothing else in the logs was relevant anwyay. Hope that helps. If I can help in any other way please let me know. |
No worries, thanks for that! Maybe the problem is you're not using an RSA key, that's a bug that was fixed in #12894 but it's not released yet. Could you try and install the latest beta and see if it works there? 🙏 |
I've just tried the beta, unfortunately, same result, same error in the logs. |
I had OpenSSH enabled from the beginning. |
Cool! 👍 Then I'd say try two things:
More specifically, this is the regex used to parse the prompt: desktop/app/src/lib/ssh/ssh.ts Line 76 in acbaeb0
2. Try disabling that checkbox to see if it works like that. I'd expect it not to work either, but it's worth checking 🤞 |
It does work with OpenSSH disabled. But I assume we want it to work with OpenSSH too? |
Yay! Yeah, it should work with OpenSSH enabled too 😕 And in that case (1) from my previous message should help clarify if it failed to parse SSH's prompt 🤞 |
Yeah, I'm going to check that but tomorrow. |
@sergiou87 I think the regex you provided is not matching our (I work with @the-real-nps) prompt.
The |
Hah! Interesting, thank you so much for the info! I'll make that part optional to fix this ASAP ❤️ |
I wonder why you decided to make the regex so specific? Are there any drawbacks for just making it |
We're parsing the host, IP, the kind of key (RSA, ECDSA…) and the fingerprint itself, but it's true we could skip the third line. I'll see if we can make this a bit more resilient, thank you! ❤️ |
@Skwara @the-real-nps a new beta went out yesterday that should fix this issue 😄 |
Unfortunately, it doesn't work (Version 2.9.4-beta4 (x64)). I've tested the output (prompt) from |
😐 Could you open a command line and run this? This is the output I'm getting on Windows 11:
Also, which exact version of Windows 10 are you using? |
It also didn't help on my side on |
I have the same setup.
Like I said, I don't know if my ssh prints |
Cool, thanks for that info! I see that version of OpenSSH for Windows indeed has a I don't see |
My exact ssh prompt message is:
|
And it's parsed correctly according to this… https://regex101.com/r/IFOJoV/1 🤯 |
Well, for me it all matched except for the possible |
Could you try to do this with that beta4? Screen.Recording.2021-10-05.at.12.17.37.movBasically, in the developer tools, go to |
I did that and it didn't even pause at the breakpoint. In the debugger I got 2 errors:
|
What I did:
Because of the above, I did the following:
So just to check, I did the following:
So it doesn't stop at the breakpoint for me. Am I doing something wrong? |
Hah! That's interesting. Maybe there is another prompt we aren't expecting or you're having a different error, so it's never getting to that SSH prompt 😐 Try setting a breakpoint at line 94 of PS: Thanks so much for helping me debugging this!!! |
I can see that upon fetching, the |
I inspected |
😥 Then I don't understand anything 😐 We can also try to run whatever GitHub Desktop is doing. If you have something like Git Bash, you can try this:
Where those |
After clicking on |
I get a different result (also Git Bash):
|
I also tried running it in windows CMD. It asked me about adding to known_hosts and cloned without problems. |
Could you try removing the |
Same result for me without |
I am completely clueless here… I don't understand why it fails the host key verification without prompting first. Do you have anything in your |
Don't even have |
@sergiou87 After further investigation we've established that the problem was not GitHub Desktop's fault. Upon running the same command that GitHub Desktop is running we received errors stated above (different for each of us). Because of that I think these errors are the root cause, not GitHub Desktop. |
Ohh! Thanks for reporting back! ❤️ |
Describe the bug
I'm using the latest version 2.9.3 and #12756's functionality isn't there: when I try to clone using SSH URL and I don't have an appropriate entry in the known_hosts file it ends with "Authentication failed" error. If I have the appropriate entry in known_hosts then cloning works fine. But I have to add the entry by other means (e.g. "ssh URL" in the command line), GitHub Desktop doesn't ask if I want to add it as in the video.
Version & OS
Version: 2.9.3 (x64)
Windows 10
Steps to reproduce the behavior
Expected behavior
GitHub Desktop shows a prompt asking whether the user wants to continue with given URL. If the user accepts, GitHub Desktop adds an appropriate entry in the known_hosts file and proceeds to clone the repo successfully.
Actual behavior
GitHub Desktop shows "Authentication failed" error and aborts cloning.
The text was updated successfully, but these errors were encountered: