Git-credential-manager-for-windows: Doesn't work with LibGit2Sharp

Created on 22 Jun 2016  路  4Comments  路  Source: microsoft/Git-Credential-Manager-for-Windows

Hi,

I'm using LibGit2Sharp in my c# code to clone a git repository. I'm wondering how can I ensure that a user is prompted for credentials and get the token to be used for cloning a repository ?

I see that Visual Studio's Git integration can do this. I'm wondering how I can do it in my code (by using LibGit2Sharp or any other library) ?

Thanks,
Rajkiran

documentation

Most helpful comment

All 4 comments

Libgit2(Sharp) provide credential callbacks. Register a callback, and then use the Microsoft.Alm.Authentication library to do the rest. The Cli-CredentialHelper/Program.cs has useful code for interacting with GitHub, VSTS, and other providers.

Thanks. I see that there is a request for Microsoft.Alm.Authentication library to be a nuget package and the issue is closed. Is the nuget package published ? (I can't find it online search). If not, do you plan to publish ?

No Nuget published yet, I'd love to but I believe we need to get signed and unsigned packages available to fully support users. There's also the bit about available time to accomplish everything. Sadly, the GCM is not my full-time day job (providing free utilities for Git doesn't pay the bills after all), but I will do my best to find time to work on these things asap.

Was this page helpful?
0 / 5 - 0 ratings