Questions tagged [libgit2sharp]

.NET and Mono open source bindings for libgit2, a native Git library

LibGit2Sharp is an thin .NET/Mono layer wrapping the libgit2 linkable C Git library.

It provides a very opiniated API which should be very easy to use and discover.

Online resources

503 questions
0
votes
1 answer

libgit2sharp branch not found on freshly cloned repo

libgit2sharp 0.21.0.176 C# on Windows Server 2008 I need to obtain reference to a specific branch. On my Windows machine, I fresh git clone local repo from remote origin on GitHub. Next I execute following libgit2sharp code : var localRepo = new…
BaltoStar
  • 8,165
  • 17
  • 59
  • 91
0
votes
1 answer

How to push newly created tag using Lib2Gitsharp

Could anybody help me to push the newly created tag using Lib2GitSharp? Below code creates tag correctly, but when I push the tag it gives me "Request failed with statis code: 401" public static bool createTag(string tag,string localRepoPath) …
Shr3y1s
  • 31
  • 4
0
votes
0 answers

Repository.RemoveUntrackedFiles() : access denied

Windows Server 2008 McAfee Agent v4.8.0.1938 no indexing service ASP.NET C# app libgit2sharp v0.21.0.176 NuGet package My ASP.NET app uses libgit2sharp Repository.Clone() method to clone a GitHub repo to local repo Running my app tests on my…
BaltoStar
  • 8,165
  • 17
  • 59
  • 91
0
votes
1 answer

Repository.Stage("*") throws an ObjectDisposedException

I stage all files under the git repository for commit, commit the changes, then check for the changes and ammend the commit, changing its message. Take a look at my code: if (this.isRepoInit) // Check if the repository has been initialized…
Alexandre
  • 97
  • 11
0
votes
1 answer

Read the files at the spesific commit with libgit2sharp

There is a bare repository, I have a commit id, and want to read all the files at that commit without cloning. This repository.Lookup(repository.Commits.First().Tree.Sha) code give me only the files that are in the commit but I want also other…
Levent Esen
  • 559
  • 7
  • 18
0
votes
1 answer

Failed To set Proxy: Wrong parameter libgit2sharp

I'm having some problems when I try to clone a repository using the library libgit2sharp. I'm getting this error: A first chance exception of type 'LibGit2Sharp.LibGit2SharpException' occurred in LibGit2Sharp.dll Additional information: Failed to…
0
votes
1 answer

How can I skip SSL verification using libgit2sharp?

I am new to libgit2sharp (and git in general). I am trying to write a small program that handles multiple repositories in an unified manner. However, I've hit a brick wall when trying to deactivate the SSL verification. The library doesn't seem to…
Laurentiu Ilici
  • 146
  • 1
  • 8
0
votes
2 answers

How to use Libgit2Sharp on Mono/MacOsX?

I am using Xamarin Studio 5.7 with Mono 3.12 on OSX 10.9.5. Using NuGet I downloaded the libgit2sharp library. I am able to use the classes when writing the code, there are no compiler errors. However at run time I get the following error: Unhandled…
shortspider
  • 1,045
  • 15
  • 34
0
votes
1 answer

What is the LibGit2Sharp equivalent of 'git checkout --ours'?

When having content conflict when merging two branches, the solution we'd like to adopt is to take our files or their files instead of using any merge tool. In Git command, I can use --ours and theirs git checkout --ours -- git checkout --theirs --…
KIMI
  • 1
0
votes
1 answer

git show-branch using LibGit2Sharp

I want to list all the commits on the remote without actually cloning the remote repository locally. Using git, I can do this by the command: git show-branch --more=500 master Do we have a way to do this using LibGit2Sharp as well?
SJM
  • 35
  • 4
0
votes
1 answer

How to set a remote using libgit2sharp?

I'm trying to do something like this: var origin = repository.Network.Remotes["origin"]; repository.Head.Remote = origin; The only problem is that "Remote" is readonly (I'm using 0.14.1.0). How do i set a default remote for HEAD?
ulu
  • 5,872
  • 4
  • 42
  • 51
0
votes
1 answer

Fiddler is not capturing libgit2 traces

I am using libgit2 to push my repository to server. But Fiddler not capturing HTTP/HTTPS traces during push operation. Which protocol(git, http or winhttp) libgit2 uses to push reporsitory when we provide basic auth credentials ? Why Fiddler not…
siva
  • 1,693
  • 2
  • 21
  • 29
0
votes
1 answer

Build libgit2sharp on Ubuntu

I'm trying to build v0.19 of libgit2sharp on my Ubuntu 14 machine using Mono 3.6.0. However when I call ./build.libgit2sharp.sh I get lots of messages like the one below. /home/chris/projects/libgit2sharp/CI-build.msbuild: error:…
JimCricket
  • 51
  • 1
  • 6
0
votes
1 answer

Git pull in application. Without using batch file. LibGit2Sharp

I want to git pull when my apllication start in folder. After that I take all dlls from this directory. C:\TESTS\front-tests I do not know how to implement this problem, so sorry that I do not have code. I asking for simple code of pull request.
Sowiarz
  • 1,071
  • 2
  • 13
  • 27
0
votes
1 answer

LibGit2Sharp Clone fails with LibGit2SharpException: Failed to mmap

Trying to clone a remote repository using LibGit2Sharp v.0.18.1.0 throws this exception: LibGit2Sharp.LibGit2SharpException: Failed to mmap. Invalid handle value: The volume for a file has been externally altered so that the opened file is no…
Kayak58
  • 41
  • 7