timtos February 2016

Add New External Git Repository Connection - Visual Studio Team Services

I am trying to add an external git repository to a visual studio team services build process but always receive an error during build:

Starting clone

Request failed with status code: 404

Prepare repository failed with exception.

On the page Specify the repository I can only read

Fill in the Add New External Git Repository Connection dialog box.

But how? Searching the internet I could not find any help. Trying out different settings - nothing helped.

What do I have to enter for a repository located at for example

https://username@bitbucket.org/repodir/repo.git

In the build definition within the repository tab I enter

Repository type: External Git Connection:

Add new external git repository connection (setting up a connection)

Server URL: https://bitbucket.org

User name: myUserName

Password/Token Key: ********

Repository name: repodir/repo.git ( I also tried Repository name: repodir/repo )

What ever I try - I always get the error message. Using command line, I can easily clone the repository. How can I enable Team Services to clone an external repository? I think I am missing something big here...

Thanks a lot for any help.

Answers


timtos February 2016

Ok. I finally managed to clone an external git repository in a build process in visual studio team services/ visual studio online. The important points are:

  • On the repository tab one can leave the repository name blank (will be entered automatically after saving later)
  • There must already be a commit on the branch mentioned at 'Default branch'
  • In the dialog 'Add new external git repository connection' (or later the 'Update authentication for repositoryName') the server URL is the whole url, something like: 'https://...myRepo.git'

I tested this with a private bitbucket repository.

Post Status

Asked in February 2016
Viewed 2,134 times
Voted 11
Answered 1 times

Search




Leave an answer