gpt4 book ai didi

git - 如何将 GIT 存储库从 Bonobo GIT Server 导入到 Visual Studio Team Services

转载 作者:行者123 更新时间:2023-12-03 00:39:08 25 4
gpt4 key购买 nike

由于 Visual Studio Team Services(位于 VisualStudio.com)支持 Git 存储库,因此我们希望摆脱托管在 azure 计算机上的自己的 Git 服务器 (Bonobo Git)。

在关闭 Bonobo Git 服务器之前,我需要将这些存储库导入 VSTS。

从第一个存储库开始它已经失败了:

TFS Online error message when importing GIT repository

  • 我尝试使用通用 .git URL。我可以使用此 URL 将存储库克隆到本地计算机上。我还尝试了包含我的电子邮件的个人 URL,但没有成功。
  • 我在经过授权和未经授权的情况下都进行了尝试。用户名是我在 Bonobo Git 服务器上的管理员用户的电子邮件和密码。
  • 我还尝试将存储库导入为新存储库,而不是导入到现有存储库。
  • 源存储库不为空。

如何才能使此导入工作?

最佳答案

我可以在我这边重现这个问题。

如果您想从 Internet 导入某些内容,则需要访问 Internet。因此,请确保 VSTS 首先可以访问 Bonobo Git 服务器。您可以尝试通过代理连接 Bonobo Git 服务器。引用这个类似的线程:Unable to import a git repository into TFS 2017.3

另一个解决方法是 Manually import the git repository (在我这边按预期工作):

  1. 创建并 cd 到临时文件夹,然后运行以下命令:

    git clone --bare http://172.17.16.147/Bonobo.Git.Server/Test0523.git

    cd Test0523.git

  2. 在 VSTS 中创建目标 git 存储库(例如https://xx.visualstudio.com/GIT/_git/Git0523)

  3. 运行以下命令将源存储库复制到目标存储库。 (在此步骤中,它将 pop 对话框,让您输入访问 VSTS 的凭据。)

    git push --mirror https://xx.visualstudio.com/GIT/_git/Git0523

    cd ..

    rm -rf Test0523.git

enter image description here

关于git - 如何将 GIT 存储库从 Bonobo GIT Server 导入到 Visual Studio Team Services,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50465863/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com