libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

Repository Clone Throws No error message has been provided by the native library Exception

Open ArunR1402 opened this issue 5 years ago • 6 comments

Am trying list down the Remote Branches in my application. am getting No error message has been provided by the native library while cloning. its only happening on the few repos.

  var path = LibGit2Sharp.Repository.Clone(sourceUrl, workingDirectoryPath, cloneOptions);

            if (!bare)
            {
                using (var repo = new LibGit2Sharp.Repository(path))
                {
                    repo.Reset(ResetMode.Hard);
                }
            }

            return path;

Trace

LibGit2Sharp.LibGit2SharpException: No error message has been provided by the native library
 at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
 at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts)
 at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options)


Reproduction steps

Am trying to clone huge repo with size around 750MB

Expected behavior

Clone the repository with out any error

Actual behavior

Should not throw "No error message has been provided by the native library Exception"

Version of LibGit2Sharp

0.26.0

Operating system(s) tested; .NET runtime tested

Local - WIndows Machine - its properly working L2, L1 - Linux Docker Container - failing

ArunR1402 avatar Jul 29 '20 18:07 ArunR1402

I have the same issue in Windows using 0.27.0-preview-0096 with a 5.8mb repository. I rolled back to 0.26.2 and it is working.

dbuksbaum avatar Jan 02 '21 00:01 dbuksbaum

I have same issue

nkochnev avatar Jan 12 '21 17:01 nkochnev

I have the same here on 0.27.0-preview-0102, I switch to preview because of https://github.com/libgit2/libgit2sharp/issues/1711

bplasmeijer avatar Jul 21 '21 18:07 bplasmeijer

0.27.0-preview-0034 does not solve #1711 but solve Operating system(s) tested; .NET runtime tested on Repository.Clone method.

bplasmeijer avatar Jul 21 '21 18:07 bplasmeijer

Is there any update on this issue? because I am still seeing it in 0.27.0-preview-0119

Hassaan-Ahsan avatar Nov 16 '21 07:11 Hassaan-Ahsan

Is there any update on this issue? because I am still seeing it in 0.27.0-preview-0119

That version is pretty old at this point. Please give the latest preview (0.27.0-preview-0158) a try.

bording avatar Nov 16 '21 15:11 bording