Closed tzAcee closed 1 year ago
libgit2 only reads known_hosts from $HOME/.ssh/known_hosts
. Do you have a file at that location? Does it have any unusual syntax?
Which version of libgit2-sys are you using? Are you using vendored or system libgit2?
libgit2 only reads known_hosts from
$HOME/.ssh/known_hosts
. Do you have a file at that location? Does it have any unusual syntax?Which version of libgit2-sys are you using? Are you using vendored or system libgit2?
The Syntax of my file known_hosts should be correct. I tried to recreate it multiple times.
Tbh. I dont know which version of libgit2 im using. I just added with with cargo add git2
, so in the cargo.toml the current version is v0.16.1. 😂
But I think fetching the $HOME env variable on windows is an issue or am I wrong? Since I think it should be %userprofile% on windows, because the HOME env variable isn't set there. Atleast I have the known_hosts file in '%userprofile%/.ssh/known_hosts'
Ah, yea, I recall now that was a problem with the current version. This should be fixed by #935 which reads windows home directories correctly.
I am getting the same error on Android. It used to work until recently.
Does anyone know a fix? Or a solution? My app is not working anymore.
I dont know whether the fix is released yet. But if not, you could get the cargo package directly from this repository, since the fix is already merged on master. If it's an android specific problem the fix wasn't enough.
For Windows I haven't tested it myself yet, so idk if it's working.
As edited: I had a build error, but I think I have fixed it. I think that this was because the git_credentials
package is locked to point to version 0.16
of git2
instead of the latest version 0.17
.
But I am still getting the error with known_hosts
.
Edit: I think my error is different, and needs Android expertise, so I am raising a separate issue on the libgit2 tracker.
The new issue is https://github.com/libgit2/libgit2/issues/6550.
I'm going to close since this should be fixed in the latest version via #935. If you can still reproduce with 0.17.1, feel free to comment, and please include as much detail as possible to reproduce your environment.
Hey, I stumble accross an error "error loading known_hosts: ; class=Ssh (23)" when I try to connect to a remote host on our company azure repo. The git cmd tool works fine of course. So the general SSH configuration should be fine. Seems like the the configuration isn't read out correctly. Do I have to set a config of the repo or something before I connect to the remote?
I wrote a simple test tool for what Im doing: