Cake_Git icon indicating copy to clipboard operation
Cake_Git copied to clipboard

Implicit windows credentials instead of unauthorized

Open JanVargovsky opened this issue 7 years ago • 5 comments

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

JanVargovsky avatar Sep 23 '18 19:09 JanVargovsky

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.

JanVargovsky avatar Sep 23 '18 20:09 JanVargovsky

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

devlead avatar Sep 23 '18 20:09 devlead

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.

devlead avatar Sep 23 '18 20:09 devlead

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.

JanVargovsky avatar Sep 23 '18 20:09 JanVargovsky

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

awesomehd1 avatar Oct 01 '18 22:10 awesomehd1