简体   繁体   English

在两个帐户之间将 TFVC 存储库迁移到 Git - 使用 git-tfs 克隆 TFVC 存储库的连接问题

[英]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.我被分配了将存储库从一个 Azure DevOps 组织迁移到另一个的任务。

The source repositories I need to move are TFVC - they want it also migrated to Git.我需要移动的源存储库是 TFVC - 他们希望它也迁移到 Git。

I found the tool git-tfs which looks like it will do everything I need.我发现工具 git-tfs 看起来可以满足我的一切需求。 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:\temp>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.我还尝试使用 ssh 键。 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 -我创建了一个密钥,将公钥添加到源 Azure DevOps 帐户中,然后将以下内容添加到 .ssh 目录中的配置文件中 -

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.请注意,使用相同的 ssh 密钥,我可以在相同的 ADO 组织 Git 存储库中执行 Git 克隆。

What am I missing to allow me to successfully connect to the tfs repositories?我缺少什么让我能够成功连接到 tfs 存储库?

Here is a link to the git-tfs tool - https://github.com/git-tfs/git-tfs/blob/master/README.md这是 git-tfs 工具的链接 - https://github.com/git-tfs/git-tfs/blob/master/README.md

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. 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 命令,则应使用以下 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.然后将显示一个帐户选择器,您可以 select 您的帐户登录。

Check the github tutorial and this doc for detailed steps.查看 github 教程和此文档了解详细步骤。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM