Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
455 views
in Technique[技术] by (71.8m points)

azure - Migrating TFVC repo to Git between two accounts - Connection issues to clone the TFVC repo using git-tfs

I have been assigned the task of migrating repositories from one Azure DevOps organization to another.

The source repositories I need to move are TFVC - they want it also migrated to Git.

I found the tool git-tfs which looks like it will do everything I need. After installing the tool I followed the directions and ran the following command to test to see if I can connect and it is having the following issue :

C:emp>git tfs list-remote-branches https://testpoint.visualstudio.com:8080/tfs/TestPoint2013

TF400324: Team Foundation services are not available from server https://testpoint.visualstudio.com:8080/tfs/TestPoint2013.
Technical information (for administrator):
  Unable to connect to the remote server
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 16.107.42.18:8080

I assumed that it needs some kind of user/pw and I found this -

To clone a TFVC repository on Azure DevOps, you should:

Enable alternate credentials. Go to "My profile"->"Security"-> Enter data and "Enable alternate credentials"
use the command following this pattern (where 'yourLogin' and 'yourPassword' was defined in the previous step) git tfs clone https://dev.azure.com/{organization} $/project/folder  --username=yourLogin --password=yourPassword

Unfortunately the feature to enable alternate credentials is turned off so I can not perform the above. I generated a personal access token and tried to use it but it did not like that either. I also tried playing with the ssh keys. I created a key, added the public key to the source Azure DevOps account and then added the following to the config file in the .ssh directory -

Host ssh.dev.azure.com
  HostName ssh.dev.azure.com
  User git
  IdentityFile ~/.ssh/ado

Is the host name correct?

Note that using the same ssh key I can perform Git clones in the same ADO organizations Git repositories.

What am I missing to allow me to successfully connect to the tfs repositories?

Here is a link to the git-tfs tool - https://github.com/git-tfs/git-tfs/blob/master/README.md

question from:https://stackoverflow.com/questions/66068532/migrating-tfvc-repo-to-git-between-two-accounts-connection-issues-to-clone-the

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The TFVC repository is in Azure DevOps service not TFS, Azure DevOps provides a simple migration tool to migrate from Team Foundation Version Control to Git.

If you still want to use git-tfs command, you should use following URL:

git tfs list-remote-branches https://dev.azure.com/{``your organization}

Then an account selector will show up and you can select your account to login.

Check the github tutorial and this doc for detailed steps.

https://docs.microsoft.com/en-us/azure/devops/learn/git/migrate-from-tfvc-to-git


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

Just Browsing Browsing

[1] html - How to create even cell spacing within a

1.4m articles

1.4m replys

5 comments

57.0k users

...