Open Zambito1 opened 9 months ago
It looks like libssh2 got support for ed25519 keys on 6 months ago, in version 1.11 (https://github.com/libssh2/libssh2/releases). I actually don't know which version we build with. Maybe it also varies across platforms. Happy to accept a PR if you can figure it out.
Oh, libgit2 also has support for OpenSSH since quite recently, so switching to that is another option. That would solve various other SSH issues we've had.
ed25519 keys worked for me for a long while, I don't think the issue you're facing has to do with them specifically. Does it work fine with RSA keys for you since you got to that conclusion?
Oops, I should have done more testing. No, RSA keys also do not seem to work. I'm not sure what else I should try to diagnose this.
It looks like the jj git clone
command above doesn't even try to connect to the ssh-agent. If it did, you should have seen the log message from here: https://github.com/martinvonz/jj/blob/99f0e7f8440eacafad9bd4ba5a30dc78ad209ad6/lib/src/git.rs#L1402-L1407
You could try adding more log messages in the code around there to see how far it gets.
I was able to poke with it more, and I noticed the issue is that I was using a ssh://host/path
URL instead of user@host:path
for my remote. Switching to the latter format worked.
I was able to poke with it more, and I noticed the issue is that I was using a
ssh://host/path
URL instead ofuser@host:path
for my remote. Switching to the latter format worked.
This doesn't seem to work if not using the default SSH port. The user@host:path
syntax doesn't support specifying a port.
Interestingly enough I get Error: authentication required but no callback set; class=Ssh (23); code=Auth (-16)
when using user@host:path
, but ssh://user@host/path
works fine for me.
Description
I am trying to use
jj git
commands that deal with remotes, such asjj git clone
andjj git fetch
. After digging into some other issues (#1970, #440), I noticed that it seems like the only expected way that this is supported withed25519
keys is by usingssh-agent
for authentication. I set upssh-agent
and added my identity, but it still does not work.Steps to Reproduce the Problem
ssh-keygen -t ed25519
ssh-copy-id <git server>
eval "$(ssh-agent -s)"
ssh-add
jj git clone <repo on remote>
Expected Behavior
The repository should be cloned.
Actual Behavior
Specifications
jj 0.13.0-5450e6c9bae40b941b05942bdd78a88e1b9093a6