cake-contrib / Cake_Git

Cake AddIn that extends Cake with Git features using LibGit2 and LibGit2Sharp
https://cakebuild.net/extensions/cake-git
Other
39 stars 64 forks source link

Implicit windows credentials instead of unauthorized #78

Open JanVargovsky opened 6 years ago

JanVargovsky commented 6 years ago

Is it possible to add support for commands (git clone, pull and push), to use implicit credentials as its done using git CLI?

JanVargovsky commented 6 years ago

Found out there is a library that can provide such credentials but it is not converted to .net standard yet (https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/596). Also I'm not sure how to handle this in crossplatform way because this is windows only.

devlead commented 6 years ago

@JanVargovsky yes looks like it could be possible https://github.com/libgit2/libgit2sharp/blob/5139749d65733fd30153f819923595b5f118a36e/LibGit2Sharp.Tests/CloneFixture.cs#L172-L196

devlead commented 6 years ago

Ok it's possible, but not available on .NET standard would be an issue, but example code for reference https://www.kevinkuszyk.com/2016/09/30/cloning-a-private-git-repository-with-libgit2sharp-and-git-credential-manager-for-windows/

But should be able to use that with Cake_Git today on full framwork but referencing Microsoft.Alm.Authentication as and addin and using code above for username/pw.

JanVargovsky commented 6 years ago

Yea, I've found the same blog post. Already integrated and works fine, kinda scared me how easily I can obtain any windows credentials though.

awesomehd1 commented 6 years ago

I think it's possible to add them because if you add git clone, pull, and push, When you like use git clone then it might show the error if you are developing the git clone feature