如何将Bonobo GIT服务器中的GIT存储库导入Visual Studio Team Services [英] How to import a GIT repository from Bonobo GIT Server into Visual Studio Team Services

查看:112
本文介绍了如何将Bonobo GIT服务器中的GIT存储库导入Visual Studio Team Services的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

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

Before we can shutdown the Bonobo Git server I need to import those repositories to VSTS.

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

Starting with the first repository it already fails:

  • 我尝试使用常规.git URL.我可以使用此URL在本地计算机上克隆存储库.我也尝试了包含我的电子邮件的个人URL,但没有成功.
  • 我尝试了有无授权.用户名是Bonobo Git服务器上我的管理员用户的电子邮件和密码.
  • 我还没有尝试导入该仓库,而是尝试将其作为新仓库导入.
  • 源存储库不为空.

如何使此导入正常工作?

How can I make this import to work?

推荐答案

我可以重现此问题.

如果您想从Internet导入某些内容,则需要 Internet访问权限.因此,请确保VSTS首先可以访问Bonobo Git服务器.您可以尝试通过代理连接Bonobo Git服务器.引用类似的线程:

If you want to import something from the Internet, you're going to need Internet access. So make sure VSTS can access the Bonobo Git server first. You can try connecting the Bonobo Git server through a proxy. Reference this similar thread : Unable to import a git repository into TFS 2017.3

另一个解决方法是手动导入git存储库(按我的预期工作):

And another workaround is Manually import the git repository (works as expected on my side):

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

  1. Create and cd to a temp folder, then run below command:

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

cd Test0523.git

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

Create a target git repository in VSTS (e.g. https://xx.visualstudio.com/GIT/_git/Git0523)

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

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.)

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

cd ..

rm -rf Test0523.git

这篇关于如何将Bonobo GIT服务器中的GIT存储库导入Visual Studio Team Services的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆