TeamCity and git repository with Visual Studio Team Services

ぐ巨炮叔叔 提交于 2019-12-10 12:35:17

问题


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 :(


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/23091358/teamcity-and-git-repository-with-visual-studio-team-services

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