简体   繁体   English

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

[英]How to import a GIT repository from Bonobo GIT Server into Visual Studio Team Services

Since Visual Studio Team Services (on VisualStudio.com) is supporting Git repositories, we want to get rid of our own Git server (Bonobo Git) that is hosted on an azure machine.由于 Visual Studio Team Services(在 VisualStudio.com 上)支持 Git 存储库,我们希望摆脱托管在 azure 机器上的我们自己的 Git 服务器 (Bonobo Git)。

Before we can shutdown the Bonobo Git server I need to import those repositories to VSTS.在我们可以关闭 Bonobo Git 服务器之前,我需要将这些存储库导入到 VSTS。

Starting with the first repository it already fails:从第一个存储库开始它已经失败了:

导入 GIT 存储库时出现 TFS Online 错误消息

  • I tried to use the general .git URL.我尝试使用通用的 .git URL。 I could clone the repo on my local machine using this URL.我可以使用这个 URL 在我的本地机器上克隆 repo。 I also tried the personal URL that includes my email, without success.我还尝试了包含我的电子邮件的个人 URL,但没有成功。
  • I tried with and without authorization.我试过和未经授权。 Username are email and password of my admin user on the Bonobo Git server.用户名是我在 Bonobo Git 服务器上的管理员用户的电子邮件和密码。
  • Instead of importing to an existing repo, I also tried to import the repo as new repo.我没有导入到现有的 repo,而是尝试将 repo 作为新的 repo 导入。
  • The source repo is not empty.源代码库不为空。

How can I make this import to work?我怎样才能使这个导入工作?

I can reproduce this issue on my side.我可以在我这边重现这个问题。

If you want to import something from the Internet, you're going to need Internet access .如果您想从 Internet 导入某些内容,您将需要Internet 访问权限 So make sure VSTS can access the Bonobo Git server first.所以首先要确保 VSTS 可以访问 Bonobo Git 服务器。 You can try connecting the Bonobo Git server through a proxy.您可以尝试通过代理连接 Bonobo Git 服务器。 Reference this similar thread : Unable to import a git repository into TFS 2017.3参考此类似线程: 无法将 git 存储库导入 TFS 2017.3

And another workaround is Manually import the git repository (works as expected on my side):另一种解决方法是手动导入 git 存储库(在我这边按预期工作):

  1. Create and cd to a temp folder, then run below command:创建并 cd 到临时文件夹,然后运行以下命令:

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

    cd Test0523.git

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

  3. Run below command to copy the source repo to the target repo.运行以下命令将源存储库复制到目标存储库。 ( It will popup the dialog to let you enter the credential to access VSTS in this step. ) 它会弹出对话框让您在此步骤中输入凭据以访问 VSTS。

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

    cd ..

    rm -rf Test0523.git

在此处输入图片说明

确保您的 Bonobo Git 服务器具有有效的 ssl 证书

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

相关问题 使用Visual Studio Team Services的TeamCity和git存储库 - TeamCity and git repository with Visual Studio Team Services 如何在Visual Studio Team Services中创建文件夹以包含Git存储库 - How to create folders to contain Git repository in Visual Studio Team Services 添加新的外部Git存储库连接 - Visual Studio Team Services - Add New External Git Repository Connection - Visual Studio Team Services Visual Studio Team Services-git存储库和解决方案之间的关系 - Visual Studio Team Services - Relationship between git repository and solution 在多个Visual Studio Team Services项目之间共享git存储库 - Share a git repository between multiple Visual Studio Team Services Projects 将多个项目(来自一个解决方案)添加到单个 Visual Studio Team Services Git 存储库 - Add multiple Projects (from one Solution) to a single Visual Studio Team Services Git repository 如何在Team Services中更改Team for git存储库 - How to change Team for git repository in Team Services Bonobo Git Server-无法从cmd进行git克隆-Visual Studio 2015可以 - Bonobo Git Server - can’t do git clone from cmd - Visual studio 2015 can 在团队中添加多个存储库 - Bonobo Git 服务器 - Add Multiple Repositories in a Team - Bonobo Git Server 带有外部git的Visual Studio Team Services - Visual Studio Team Services with external git
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM