Skip to content

Problem with remote relying on .ssh/config #362

Closed
@dkm

Description

@dkm

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions