libgit2sharp: 401 Clone Bug in 0.19

Perhaps this is an reentry of : https://github.com/libgit2/libgit2sharp/issues/529

After upgrading from 0.17 to 0.19 i got this bug again. anyoneelse? (PS only when i use libgit inside a MVC Application not from a console)

I can simple reproducei t.

Create a new ASP MVC 4.5 Project. Add nuget reference to current libgit package (0.19) then extend a controller like HomeController with the following code

  public async Task<ActionResult> Index()
        {


            string myRepo = ; <- Place your reponame here
            string myLocalPath = <- PLace yoru local path here

            Credentials credentials = new UsernamePasswordCredentials()
            {
                Username = "User",
                Password = "PW!"
            };

            try
            {
                CloneOptions options = new CloneOptions { IsBare = false, Credentials = credentials };
                Repository.Clone(myRepo, myLocalPath, options);
            }
            catch (Exception err)
            {
                if (err != null)
                { }
            }
            return View();
        }

i you give me your mail i could also mail you the project.

If i do the same thing with 0.17 everything works fine.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 24 (17 by maintainers)

Commits related to this issue

Most upvoted comments

Wooo this issue is almost 10 years old, and the wiki page still contains reference to CredentialsProvider 😄