davidB / git2_credentials

Provide credentials function to used with git2::RemoteCallbacks.credentials
Apache License 2.0
21 stars 4 forks source link

CredentialHandler fails without ~/.ssh/config file #20

Closed rherrmann closed 3 years ago

rherrmann commented 3 years ago

First off, thank you for your work!

I tried using the library in an environment without a ~/.ssh/config file, however it fails trying to open the non-existing file:

failed to open ".../.ssh/config": Os {
    code: 2,
    kind: NotFound,
    message: "No such file or directory",
}

To me, it seems read_ssh_config_as_string should return Ok(None) if there is no config file. Does this makes sense?

davidB commented 3 years ago

make sense, Thanks for reporting the bug, I released 0.7.1 with the fix