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

Skip checking certificate #156

Open RZProf opened 2 years ago

RZProf commented 2 years ago

In equivalent c# code we can use below line:

var path = LibGit2Sharp.Repository.Clone(
                repo,
                testRepo.FullPath,
                                new LibGit2Sharp.CloneOptions
                                {
                                    BranchName = "develop",
                            CertificateCheck = (certificate, valid, host) => true,
                            Checkout = true,
                                    CredentialsProvider = (url, fromUrl, types) => new LibGit2Sharp.UsernamePasswordCredentials
                                        {Username = "****", Password = "*****"}
                                });

what about cake script?!

i try to paste above code in cake file. it fails with LibGit2SharpException: No error message has been provided by the native library

thanks