Stefan Widgren
Stefan Widgren
@jennybc I have made an internal test [function](https://github.com/ropensci/git2r/blob/74ba74a446b8b2b9e3322e32cfc199e9f88b74c5/src/git2r_cred.c#L216) in the `credentials`branch that tries to list available ssh keys. Does it find the keys on a Windows machine? Example how to...
Ok, I have changed to use `R_ExpandFileName("~")` to find home.
I think you are right. I have changed again. Now I'm only trying to find the paths to: `"%HOME%\\"`, `"%HOMEDRIVE%%HOMEPATH%\\"` and `"%USERPROFILE%\\"`
I think that is because I didn't map the wide character string (from [ExpandEnvironmentStringsW](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724265(v=vs.85).aspx)) to utf8. I have now fixed that (I hope)
Definitely easier :) Let us see if this works, or I change approach.
The reason I'm trying to do this in C code is that the libgit2 callback (if the remote host requires authentication) provides information about the requested authentication type. So instead...
I have fixed the build
I have added code to check for the keys.
Great :smile: I will fix the duplicates and compiler warning. The next step is to integrate this code in the libgit2 callback.
On my machine, git2r now finds the default keys so that it works to push/pull/clone. Note, it doesn't handle passphrase protected keys yet (https://github.com/ropensci/git2r/blob/credentials/src/git2r_cred.c#L385).