R – TeamCity SVN Checkout Failing Due to File Locks

continuous integrationsvnteamcity

This is my first TeamCity project, and I am having an issue with SVN checkout.

Here are my settings for the SVN checkout from within TeamCity:

  • VCS Checkout Mode – Automatically on Agent
  • Checkout Directory – C:\BuildCheckouts[Project Name]
  • VCS Labelling mode – Do Not Label
  • Externals Support – Full Support
  • Default Config Directory – Use Default Directory
  • Working Copy Format – 1.5

On my first run of the build, everything runs fine, checkout occurs, and the build continues. On my second checkout, however, the build fails and I get the following error message:

[03:31:28]: Updating sources: Agent side checkout... (1s)
[03:31:30]: [Updating sources: Agent side checkout...] Failed to perform checkout on agent: org.tmatesoft.svn.core.SVNException: svn: Error during update from http://[Server Name]/svn/[Project Name] to C:\BuildCheckouts\[Project Name]
svn: Cannot create new file 'C:\BuildCheckouts\[Project Name]\Tools\.svn\lock': Access is denied

I have tried searching for this specific error, and came up with this old article (2003), but it does not seem to apply since I am using NTFS as my file system.

Since my build script runs tests after compiling, I need the externals downloaded to the checkout directory along with the actual code.

Are my configuration settings incorrect?

Best Answer

Try running the Teamcity service under the specific user account which has permissions to modify files on the machine. We are doing so and haven't faced this issue.

Related Topic