libgit2 / libgit2/libgit2sharp
Repository Clone Throws No error message has been provided by the native library Exception
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure through Repository.Clone on the Linux Docker environment and compare it with the working Windows case. Trace the reported path through Core.Ensure.HandleError and Proxy.git_clone; done means the affected repository clones without the native-library exception and the resulting error behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100