[英]git-tfs when trying to clone tfs repo error contacting server
我正在尝试将回购从前同事托管的 tfs 移动到新的 azure devops 帐户(将使用 git)。 通过研究,我发现将它与历史一起移动的唯一可能性是在命令行中使用 git-tfs 工具。 当我运行这个:
git tfs clone -u xxxx -p xxxx https://acctname.visualstudio.com/project/_versionControl?path=%24/repo/folder $/https://dev.azure.com/newaccount/newproject/_git/newrepo .
我得到一个登录微软帐户的弹出窗口,成功登录后我得到这个:
Please contact your administrator. There was an error contacting the server.
Technical information (for administrator):
HTTP code 200: OK
我对此束手无策。 如果有人有更好的方法来处理整个移动,我也很乐意听到。
调用git tfs clone
将尝试在您朋友的原始 Azure DevOps 实例上创建 TFVC 存储库的本地副本。 它不会在单个命令中将存储库从一台服务器镜像到另一台服务器。 创建本地副本后,您可以将新帐户添加为远程帐户,然后将更改推送到新帐户。
git tfs clone https://acctname.visualstudio.com/ $/project
git checkout -B main
git remote add target https://dev.azure.com/newaccount/newproject/_git/newrepo
git push -u target main
// Optionally push other branches too.
但可能有一种更简单的方法可以做到这一点。 在 Azure DevOps(以及他的所有帐户)中,源帐户中的新空白存储库上有一个导入选项。 在存储库下拉列表中,选择“导入存储库”并将其指向您的 TFVC 主分支。 这将转换最多 180 天的历史记录,并在源帐户中为您创建一个 git 存储库。 如果你想要超过 180 天的历史,gittfs 是唯一的方法。
然后,您可以在新帐户上使用相同的导入存储库选项将 git 存储库从旧帐户直接转移到新帐户。
如果您将源帐户与至少具有“代码(读取)”权限的个人访问令牌一起传递,则可以让 Azure DevOps 为您执行迁移。
看:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.