2

While working with a project stored on Gitlab and using Visual Studio 2013 Express RC, I ran into an issue where a couple items in Solution Explorer were marked with a red x (where a padlock, plus sign, or red checkmark typically are) with a tooltip of "pending delete" and in the Team Explorer changes window I see that they are marked for delete and a few of these items, oddly, were duplicated in the Untracked changes section as well. Not sure how to reproduce. The only thing I can think of doing was removing Entity Framework and adding in EF6 RC1.

The real problem is that I attempted committing the items which worked fine. I figured after syncing that I could just reconstruct the items that may end up disappearing. However, when I went to commits -> Sync, I received this error:

An error occurred. Detailed message: An error was raised by libgit2.
Category = Net (Error).
Response status code does not indicate success: 413 (Request Entity Too Large).

I imagine the odd behavior vaguely described (sorry, no idea how it originally happened) is the culprit in this.

4

2 回答 2

2

Not sure of the best practices way, but resolved by:

1. opening Git Bash
2. cd'ing to the root directory. 
3. Set up globals and origin (using set-url as it already existed. Globals 
   were probably already present, but when attempting step 4 prior to this 
   step, I was greeted with a username/password prompt).
   * Originally wasn't aware that the user/pass was for http auth (which Visual 
     Studio must use). Probably an unneccessary step.
4. git push origin master -> entered passphrase
5. checked on Gitlab: the two commits had been pushed out.

was really hoping to see the 413 error message again but this time with hopefully more information, but there were no error messages encountered.

Going to mark as answer, but if someone knows of a more "built in" manner of handling this, I'd be more than happy to switch to that.

于 2013-09-23T19:37:22.207 回答
2

Please try as per this link below try this http://www.codeease.com/an-error-was-raised-by-libgit2-category-net-error.html

We must change the default repository location to our project directory which we push the project to Visual Studio Online from.

For changing the default repository location, following the following steps:

1: Go to Team Explorer home screen. click Settings button:

2: Click Git Settings:

3: Change Default Repository Location to your current project folder, for example: change to D:\Mycode\MyTestGitProject

After you changed, now try Sync repository, it should work then.

This worked for me

于 2014-09-11T13:55:55.857 回答