How to use Mercurial file share with TeamCity

I've recently installed Teamcity 6.5.1 (build 17834) and I was trying to setup the project build but encountered an error from the begging. Our mercurial repository is located on file share and all developers just push they code to that repository working copy in that repository never updates. When I try to setup the repository via TeamCity I get the following error:

Connection failed!
'cmd /c hg identify "\\extdrive\pathToRepository"' command failed.
stderr: abort: repository \\extdrive\pathToRepository not found!
When I run the command on the server I get the following:
H:\>cmd /c hg identify "\\fffs1\busunits\IT Development Team\HgRepositoryDev\\"

Comment actions Permalink

Did you execute the last command as the TeamCity user?

Comment actions Permalink

I execute the last command as Administrator on the build server box.
How can I change user account under which teamcity runs after installation? I've tried to change accout for both TeamCity agent and Teamcity Webserver but still get the same errors.

Comment actions Permalink

Don't know about TeamCity configuration, but you can use runas to get repo info as the TeamCity user. Also you can use ProcMon to get more details about the error.

Comment actions Permalink


This is limitation of Windows - system services cannot access file shares.
I see two options:

  1. Run TeamCity build agents as interactive processes within your user session by agent.bat
  2. Provide access to the repository by HTTP

Please sign in to leave a comment.