0

I have a repo in Azure Devops using TFVC for version control and I'm trying to migrate the repo which has several branches to a new repo using git. I'm following instructions from this video https://youtu.be/7qiQ6ONkSf4 How to Migrate your TFVC repository to Git. When I get to the step where I need to run git tfs list-remote-branches https://dev.azure.com/{my_repo} I get a pop up to sign into Azure Devops but when I'm returned to PowerShell I get this error: TF30063: You are not authorized to access https://dev.azure.com/{my_repo}. The remote server returned an error: (401) Unauthorized.

I'm also using Visual Studio to manage the repo and using Visual Studio I'm able to check in to the repo through Visual Studio without issue.

I tried git tfs list-remote-branches. I was expecting it to list the remote branches after being returned to PowerShell from the sign in popup. Instead I received the error: TF30063: You are not authorized to access https://dev.azure.com/{my_repo}. The remote server returned an error: (401) Unauthorized.

Gus Larson
  • 13
  • 2

1 Answers1

1

It seemed that you had used a wrong URL. For the URL, please use https://dev.azure.com/{DevOpsOrgName} rather than https://dev.azure.com/{MyRepo}

I managed to list my TFVC project branches with the command below after sign-in my DevOps organization.

git tfs list-remote-branches https://dev.azure.com/{DevOpsOrgName}

TFVCBR

Alvin Zhao-MSFT
  • 508
  • 2
  • 6
  • Yes! I just figured this out through another stack overflow comment where the OP is trying to use the server url. Microsoft support was trying to tell me I needed the server url but you are right, it's that I have the wrong url for the service. I needed to put the organization not the name of my repository. Thanks for this answer! – Gus Larson Jan 05 '23 at 14:34