git2-rs icon indicating copy to clipboard operation
git2-rs copied to clipboard

Clone with SSH not work if port is not 22

Open ChenhuiZhang opened this issue 2 years ago • 1 comments

Hi,

I have a git server which use different port as default 22, so when I try to clone it with something below:

builder.clone( "[email protected]:23953/xxxxx", Path::new("/tmp/git2-rs"), )?;

It will timeout, and when I strace the process, I see it try to connect with the server at port 22, I didn't find some way to change the port, does anyone know how to do this? Thanks.

Best Regards, Hermes

ChenhuiZhang avatar Apr 17 '23 03:04 ChenhuiZhang

AFAIK, the ssh shorthand syntax doesn't have a place to put the port. It needs to be a full SSH url, as in ssh://user@host:23953/path.

ehuss avatar Jul 08 '23 20:07 ehuss