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

Problem with remote relying on .ssh/config #362

Closed
dkm opened this issue Oct 18, 2018 · 2 comments
Closed

Problem with remote relying on .ssh/config #362

dkm opened this issue Oct 18, 2018 · 2 comments

Comments

@dkm
Copy link

dkm commented Oct 18, 2018

Hi!

I'm not sure this is a problem with your rust bindings, but I have not been able to make a similar example work with the libgit2.
It looks like the ssh configuration is not used when accessing remote using ssh.

$ git remote -vv
origin  toto:git/max7219.git (fetch)
origin  toto:git/max7219.git (push)

With .ssh/config:

Host toto
  hostname some.hostname.bar
  user foo

Then, libgit2 will raise an error when an access to the remote is tried (I have this error in a personal project, but using the ls-remote example yields the same error) :

$ ../testlibgit2/target/debug/testlibgit2  origin
error: failed to resolve address for toto: Name or service not known; class=Net (12)

I suspected an outdated libssh2 on my centos7, so I updated it to 1.8.0 without any difference.
I've also tried using an up-to-date debian sid (that ships with 1.8.0).

Is this a problem of libgit2-rs ? Or should I try to dig in libgit2 ?

@alexcrichton
Copy link
Member

Thanks for the report! Currently libgit2 relies exclusively on libssh2 for ssh support, and libssh2 doesn't read ~/.ssh/config (AFAIK). It'd be great to have support for that though!

@dkm
Copy link
Author

dkm commented Oct 18, 2018

Thanks for your reply. After some more search, I've found this:
libgit2/libgit2#4338
I guess I can close this issue as it has nothing to do with your bindings.

@dkm dkm closed this as completed Oct 18, 2018
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