簡體   English   中英

在兩個帳戶之間將 TFVC 存儲庫遷移到 Git - 使用 git-tfs 克隆 TFVC 存儲庫的連接問題

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

我被分配了將存儲庫從一個 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

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.

如果您仍想使用 git-tfs 命令,則應使用以下 URL:

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

然后將顯示一個帳戶選擇器,您可以 select 您的帳戶登錄。

查看 github 教程和此文檔了解詳細步驟。

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