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

Clone with SSH not work if port is not 22 #949

Open
ChenhuiZhang opened this issue Apr 17, 2023 · 1 comment
Open

Clone with SSH not work if port is not 22 #949

ChenhuiZhang opened this issue Apr 17, 2023 · 1 comment

Comments

@ChenhuiZhang
Copy link

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(
"foo@git.bar.com: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

@ehuss
Copy link
Contributor

ehuss commented Jul 8, 2023

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.

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

2 participants