-
Notifications
You must be signed in to change notification settings - Fork 325
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: better error for ssh hostname changes #1507
Comments
While this is true and we need a better human error, the
|
truthfully I did not try The end result is that I actually spent about 45 minutes trying various stupid things before figuring out the workaround I did. |
Well what port would the git clone
That should be an easy partial fix for the hint then, thanks, makes total sense that people don't think about ssh-ing to github.com like that. Ideally ofc the hint would be specifically for when host identification changes like it happened with github, libssh2 errors dont give too much information though it seems |
Honestly, I had never thought about it. It is funny the abstractions we just accept :) |
I suspect we should add a |
Relatedly, when I attempted
When I did a normal
In this case, there was no error message to help me figure out (or remediate) the problem. |
If you install jj from head, you should at least get a hint there: Lines 165 to 181 in 0c36b1a
I'm guessing |
I installed jj from head (using the |
(I turned on VPN (quantumult x).Yes, I have to turn it on.) I encountered a similar situation 11:37 ❯ jj git clone https://github.com/zzhaolei/jj-demo.git
Fetching into new repo in "/Users/zhaolei/Study/jj-demo"
branch: main@origin [new] untracked
Setting the revset alias "trunk()" to "main@origin"
Working copy now at: srltlnwl d6627064 (empty) (no description set)
Parent commit : luoyttxn 58cd234f main | add gitignore
Added 2 files, modified 0 files, removed 0 files
11:37 ❯ rm -rf jj-demo/
11:37 ❯ jj git clone [email protected]:zzhaolei/jj-demo.git
Fetching into new repo in "/Users/zhaolei/Study/jj-demo"
Error: failed to start SSH session: Failed getting banner; class=Ssh (23)
Hint: Jujutsu uses libssh2, which doesn't respect ~/.ssh/config. Does `ssh -F /dev/null` to the host work? 11:39 ❯ ssh -F /dev/null [email protected]
Connection closed by 198.18.1.134 port 22 git erverything is ok: 11:40 ❯ git clone https://github.com/zzhaolei/jj-demo.git
...
11:40 ❯ rm -rf jj-demo/
11:40 ❯ git clone [email protected]:zzhaolei/jj-demo.git
...
|
@martinvonz I just ran into this when cloning for the first time on a new device. The |
Yes, looks like it: https://libssh2.org/libssh2_knownhost_addc.html There's also #3191 for switching from libssh2 to OpenSSH, which should solve lots of problems related to ssh config. |
I recently tried to use
jj
to push to github. The error I got was very perplexing to me. In particular I saw this.I eventually traced this down to the recent github host changing
so this fixed it, but an error message that told me something more (or better yet gave me the prompt that git does) would be awesome.
The text was updated successfully, but these errors were encountered: