Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity and git repository with Visual Studio Team Services

I'm trying to configure TeamCity to build the project located on the Visual Studio Team Services with Git as VCS. The project contains spaces in the URL, so it looks like: https://mysrv.visualstudio.com/DefaultCollection/_git/some%20project

Clone from Visual Studio 2013 works fine, from command line too. When I'm configuring VCS Root in TeamCity and press the Test Connection button it says that connection established, but when I'm trying to run the build TeamCityt reports that there is no compatible agents, and on the Compatible Agents tab of the build I see the message: Implicit requirements: 20project defined in VCS Root: Git VS MySrv

Is it possible to fix this issue?

P.S. I tried to rename repository on VS Team Services, but it adds to the Url collection name with the spaces :(

like image 533
msi Avatar asked Apr 15 '14 18:04

msi


People also ask

How do I use TeamCity with Visual Studio?

Installing Add-inNavigate to the download page of the Visual Studio Add-in: Click the arrow next to your username in the top right corner of the TeamCity web UI and select Profile. In the TeamCity Tools section on the right, click the Visual Studio Add-in download link.

What is VCS root in TeamCity?

A VCS root in TeamCity defines a connection to a version control system. It represents a set of parameters (paths to sources, username, password, and other settings) that determine how TeamCity communicates with a VCS to monitor changes and get sources for a build.

How do I link TeamCity to Azure DevOps?

Integrating TeamCity with Azure DevOpscreate a project from a Git repository URL. create a VCS root from URL. enable user authentication via Azure DevOps.


2 Answers

Do you still get this behaviour, if you try to use unescaped url (without %20 replacing space)?

Another option is to escape '%' sign itself with another '%' - so escaped url of your repository will look like this https://mysrv.visualstudio.com/DefaultCollection/_git/some%%20project

like image 90
Oleg Rybak Avatar answered Oct 22 '22 00:10

Oleg Rybak


I also had this issue: there were two url-encoded spaces (%20) in my Git repo url, so the text in between the two % signs was being treated as a TeamCity variable, resulting in the error Parameter "20Text/Between/the/spaces" is undefined.

Doubling-up the % characters to escape them as per Oleg Rybak's recommendation fixed this.

like image 35
Stelloy Avatar answered Oct 22 '22 02:10

Stelloy