Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect TeamCity to Visual Studio Online

I'm trying to migrate from on-premises TFS to Visual Studio Online. We have quite elaborate TeamCity build process that we don't want to migrate away from, so having TeamCity working with VSO would be ideal.

I've created alternative user credentials (as per this article) and using these credentials in TeamCity. But when I create new VCS in TeamCity, I get connection error:

TF30063: You are not authorized to access https://myproject.visualstudio.com/DefaultCollection/MyProject

I've tried my actual credentials (not alternative ones) but nothing changed - same error.

Also I've tried using alternative credentials with tf command line tool and could not enter alternative credentials - a window popped up, asking me for my LiveId.

Any idea how to fix this?

p.s. this is how TeamCity configuration look like:

enter image description here

like image 487
trailmax Avatar asked Jun 23 '14 11:06

trailmax


People also ask

How do I use TeamCity with Visual Studio?

Installation and StartIn your TeamCity web interface, choose My Settings and Tools under your username in the top right corner. Then, in the TeamCity Tools section on the right, click the Visual Studio Add-in download link. Download any of compatible JetBrains . NET products, e.g. ReSharper or dotCover.

How do I connect to TeamCity?

Go to Administration | Applications and click New application. Enter a convenient name and save the application. Go to the app's Authorization tab and click Configure requirements under the In-context Authorization section. Enter the name of the Space project you are about to access from TeamCity.

Is TeamCity cloud based?

JetBrains has announced the availability of TeamCity Cloud, a cloud-based Continuous Integration and Continuous Delivery (CI/CD) platform. TeamCity Cloud includes many of the great features seen in TeamCity One-Premises and provides them as a fully managed cloud service hosted by JetBrains.

What is TeamCity cloud?

TeamCity Cloud gives you everything you need to set up CI/CD for your entire company. It supports Git, Perforce, Mercurial, and other version control systems out of the box – no plugins required – and can build projects that have source code distributed across multiple repositories of different types.


1 Answers

To connect to Visual Studio Online you indeed need to enable alternate credentials on the account you'll use for Team City. Ensure that at least Team Explorer 2012 and update 4 is installed on the Team City server, install the whole Visual Studio 2012 incl Update 4. Team City requires at least update 2, but Microsoft only supports Visual Studio 2012 RTM and the latest update (which is update 4).

Then in the connection screen use the following information: enter image description here

Repository URL: https://myaccount.visualstudio.com/DefaultCollection

Username: ##LIVEID##\[email protected] // Your visual Studio Online User Name, must match your LiveId.

Password: ********* // The password you setup for the alternate credentials.

You can also use the VSO Service Account credentials instead of using Alternate Credentials.

Then in your VCS Root configuration map your TFVC root in the following way:

Root: $/MyProject/Path/To/Branch/Root

Check out this post on the Jetbrains Confluence site for more details.

like image 151
jessehouwing Avatar answered Sep 28 '22 04:09

jessehouwing