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

六眼飞鱼酱① 提交于 2019-12-02 12:36:56

问题


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.

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

Starting with the first repository it already fails:

  • I tried to use the general .git URL. I could clone the repo on my local machine using this URL. I also tried the personal URL that includes my email, without success.
  • I tried with and without authorization. Username are email and password of my admin user on the Bonobo Git server.
  • Instead of importing to an existing repo, I also tried to import the repo as new repo.
  • The source repo is not empty.

How can I make this import to work?


回答1:


I can reproduce this issue on my side.

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

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

  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

  2. Create a target git repository in VSTS (e.g. 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.)

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

    cd ..

    rm -rf Test0523.git




回答2:


Make sure that your Bonobo Git Server has a valid ssl certificate



来源:https://stackoverflow.com/questions/50465863/how-to-import-a-git-repository-from-bonobo-git-server-into-visual-studio-team-se

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!