VisualStudio: An error was raised by libgit2. Category = Checkout

44,746

Solution 1

Sadly, the Visual Studio plugin for Git doesn't display the error messages you need to troubleshoot this problem. (I hope they plan that feature for a later release.)

Try pulling the latest commits using Git Bash or using TortoiseGit. Either of those tools should let you know where your conflicts are.

Solution 2

To see the error you should run git command line You can find it at Team Emplorer -> Unsynched commits -> Actions -> Open in Command Prompt

Then you should use git pull command

Be careful with credential if you are using visualstudio.com, in this case you must have an alternative login and password for connect to git from command prompt.

Solution 3

For resolving the issue follow below steps:-

1)Close visual studio.
2)Now Open visual studio without opening any solution..
3)Open team viewer and then go to git home->changes..
4)Then click on commit..
5)Now you will get the unresolved conflicts..
6)Resolve the conflicts and commit..

Problem Resolved :).
Cheers

Solution 4

This error often occurs when:

  • You have a proxy on your network:

    See some solutions on configuring your git proxy settings here.

  • or... The git url you are trying to connect to is over 256 characters

Solution 5

Visual Studio Tool for Git didn't supported the remote repositories using the SSH protocol, only HTTP and HTTPS were supported but now it supports SSH as well.

See the url on how to resolve this- https://github.com/libgit2/libgit2sharp/issues/255

Share:
44,746
Null Reference
Author by

Null Reference

N.A

Updated on February 16, 2021

Comments

  • Null Reference
    Null Reference about 3 years

    I'm using TFS with Git, installed Visual Studio Tools for Git.

    I'm trying to pull all commits (5 in total) from TFS, but I get this error below:

    An error occurred. Detailed message: An error was raised by libgit2. 
    Category = Checkout (MergeConflict).
    2 conflicts prevent checkout
    

    How do I resolve this?

    error