11

I am trying to migrate a TFVC project to Visual Studio Online git repository using git-tfs. Everything works fine for the migration however now whenever I try to sync using Visual Studio 2015 I get this error.

Error encountered while pushing to the remote repository: report-status: protocol error

Even though VS reports this error everything is pushed correctly to the remote repo. If I use the command line or Git Extensions instead of VS I get no error of any kind.

I also get a lot of strange behavior when trying to create branches. It works fine outside of VS. Using VS to branch doesn't work until I first create a branch outside of VS.

Has anybody run into this issue?

dotnetmensch
  • 586
  • 2
  • 6
  • 20
  • Perhaps you choose ssh as protocol for your remote and that is not supported by VS. Try to switch to https. – Philippe Jan 27 '16 at 07:25
  • I'm getting the same error message with a recently (past month) created TFS Git repository. Same behavior with regards to sync and push behavior showing the error even though the source in TFS shows that the files are present. Using the command line Git tools also works correctly with no error. – rjzii Jan 27 '16 at 18:55
  • No ssh, I am using https so that's not the issue. It is odd that there is almost no mention of this issue out there on the internet, at least none that I could find. – dotnetmensch Jan 28 '16 at 14:19
  • @rjzii, check the answer from TK-421 to see whether it works for you too. – Cece Dong - MSFT Jan 29 '16 at 01:57
  • The difference between Git command and VS built-in plugin is that Git use tls1.0 protocol and VS Plugin use tls1.2 protocol. Refer to this question for details: http://stackoverflow.com/questions/31999042/git-push-not-working-in-visual-studio-2015. According to the error message, you may need to check your network environment. – Eddie Chen - MSFT Jan 29 '16 at 06:18
  • @Eddie-MSFT My team is using a Git repository hosted in Visual Studio Online and Visual Studio 2015. I would hope that the Microsoft tool chain would not have protocol errors in it. :) – rjzii Jan 29 '16 at 15:26

2 Answers2

15

I got this error but with slightly different behavior: changes were NOT pushed to the remote server.

{Local-Branch} > Right-Click > Push did NOT work for me, but the following did:

From the Team Explorer Home screen in Visual Studio 2015:

  1. Click Branches
  2. Click on the dropdown at the top that has Branches | {ProjectName}
  3. Select Sync
  4. Click Sync button.

This pushed changes from my local branch to my remote branch.

GraehamF
  • 1,971
  • 24
  • 24
8

You need to make sure you have a branch set as default. Go to the settings of you repo, and click on version control, then right click on your master branch to set as default.

enter image description here

TK-421
  • 387
  • 2
  • 11
  • This seems to have fixed the problem in my group as well, although it does raise some concerns related to security. – rjzii Jan 29 '16 at 16:09
  • @rjzii You had me paranoid about security concerns. A few hours of pulling my hair out, let me to discover that it has to do with not having a default branch set, not permissions. I reproduced the error on two new repos, and set the branch without modifying permissions. And all is well. Why adding the group fixed this, I'm not sure. See my edit. – TK-421 Jan 30 '16 at 01:16
  • This seems to have fixed it for me too. Thanks. – dotnetmensch Feb 08 '16 at 17:53
  • Can someone explain where this screen is? Are you looking at your VIsualStudioOnline.com account or in Visual Studio under Team Explorer? I can seem to find where to verify that I have a branch set as default. – Caverman May 11 '16 at 19:24
  • @Caveman It is located in your VisualStudioOnline.com account in the Manage Project section. In your account home page, click on the "gear" next to your name in the upper right menu. – TK-421 May 13 '16 at 04:37