Visual Studio error pushing to remote git - git-tfs migration
Asked Answered
V

2

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?

Vespiary answered 26/1, 2016 at 17:18 Comment(6)
Perhaps you choose ssh as protocol for your remote and that is not supported by VS. Try to switch to https.Three
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.Decal
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.Vespiary
@rjzii, check the answer from TK-421 to see whether it works for you too.Snowber
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: #31999542. According to the error message, you may need to check your network environment.Premolar
@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. :)Decal
W
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

Warlike answered 28/1, 2016 at 18:45 Comment(5)
This seems to have fixed the problem in my group as well, although it does raise some concerns related to security.Decal
@Decal 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.Warlike
This seems to have fixed it for me too. Thanks.Vespiary
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.Neilneila
@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.Warlike
C
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.

Casie answered 1/7, 2016 at 22:29 Comment(4)
Oddly enough, the selected answer doesn't work for me, but these steps do. Right-click > Push doesn't work (even after setting a default branch), but 'Push' in the Sync pane does.Fantasist
Yes, in my case only "Push" from Sync pane worked as well.Gaud
Push option is disabled for me, what to do ?Staceystaci
@IbrahimAmer Push & Pull are only available for the currently checked out (bold) branch.Promptbook
W
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

Warlike answered 28/1, 2016 at 18:45 Comment(5)
This seems to have fixed the problem in my group as well, although it does raise some concerns related to security.Decal
@Decal 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.Warlike
This seems to have fixed it for me too. Thanks.Vespiary
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.Neilneila
@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.Warlike

© 2022 - 2024 — McMap. All rights reserved.