[英]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:从第一个存储库开始它已经失败了:
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 存储库(在我这边按预期工作):
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
Create a target git repository in VSTS (eg https://xx.visualstudio.com/GIT/_git/Git0523
)在 VSTS 中创建目标 git 存储库(例如
https://xx.visualstudio.com/GIT/_git/Git0523
)
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.