【问题标题】:Migrating TFVC repo to Git between two accounts - Connection issues to clone the TFVC repo using git-tfs在两个帐户之间将 TFVC 存储库迁移到 Git - 使用 git-tfs 克隆 TFVC 存储库的连接问题
【发布时间】:2021-05-10 02:32:01
【问题描述】:

我被分配了将存储库从一个 Azure DevOps 组织迁移到另一个组织的任务。

我需要移动的源代码库是 TFVC - 他们希望它也迁移到 Git。

我发现工具 git-tfs 看起来可以满足我的一切需求。 安装工具后,我按照说明运行以下命令进行测试,看看我是否可以连接,它有以下问题:

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

我认为它需要某种用户/密码,我发现了这个 -

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

不幸的是,启用备用凭据的功能已关闭,因此我无法执行上述操作。 我生成了一个个人访问令牌并尝试使用它,但它也不喜欢那样。 我也尝试过使用 ssh 键。我创建了一个密钥,将公钥添加到源 Azure DevOps 帐户,然后将以下内容添加到 .ssh 目录中的配置文件中 -

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

主机名是否正确?

请注意,使用相同的 ssh 密钥,我可以在相同的 ADO 组织 Git 存储库中执行 Git 克隆。

为了让我能够成功连接到 tfs 存储库,我缺少什么?

这里是 git-tfs 工具的链接 - https://github.com/git-tfs/git-tfs/blob/master/README.md

【问题讨论】:

    标签: git azure azure-devops tfvc


    【解决方案1】:

    TFVC 存储库位于 Azure DevOps 服务而非 TFS 中,Azure DevOps 提供了一个简单的迁移工具来从 Team Foundation 版本控制迁移到 Git。

    如果你还想使用 git-tfs 命令,你应该使用以下 URL:

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

    然后会显示一个帐户选择器,您可以选择要登录的帐户。

    查看 github 教程和此文档了解详细步骤。

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

    【讨论】:

    • 您好,感谢您的分享,您可以接受它作为答案,它可以帮助遇到相同问题的其他社区成员,我们可以存档此线程。谢谢。祝你今天过得愉快。 :)
    猜你喜欢
    • 2015-07-14
    • 2020-01-13
    • 2016-08-15
    • 2020-09-19
    • 1970-01-01
    • 2017-01-23
    • 2021-03-02
    • 2018-06-20
    • 2019-08-11
    相关资源
    最近更新 更多