I am trying to get a build process set up in TeamCity 5, and I am encountering an access denied error when trying to copy some files. I see that my build agent is running as "SYSTEM" now, and I think that's part of the problem. I'd like to change that user identity. The trouble is that I can't figure out how to change those settings on the build agent. How can I change the build user identity?
Asked
Active
Viewed 2.5k times
53
-
8I think this is a topic relevant to programming. Superuser is not typically oriented around setting up automated build processes. – Chris Farmer Mar 21 '10 at 01:17
-
Sorry, I though TeamCity was some kind of game or something. – Nathan Osman Mar 21 '10 at 01:19
-
7@George: :) It's not a very exciting game at all! It's a pretty cool continuous integration framework, though. – Chris Farmer Mar 21 '10 at 01:29
-
4it mightbe a CI framework, but it also reticulates splines. – Aug 10 '10 at 16:02
1 Answers
68
- Open the services list (Start -> Run -> services.msc)
- Find the "Team City Build Agent" service
- Open the properties dialog for the service (right click, Properties)
- Choose the "Log On" tab
- Change the identity of the user running the service by choosing "this account" and enter the password.

Matt
- 74,352
- 26
- 153
- 180

Otávio Décio
- 73,752
- 17
- 161
- 228
-
7I've done this and `user.name` still shows up as `SYSTEM`, even though the `user.home` points to the correct path. Is this expected? Is there some sort of refreshing I have to do? – Merlyn Morgan-Graham Oct 06 '11 at 01:34
-
-
Open the properties dialog for the service - what does this mean? How do you find the service to open the properties dialog? – Luke Mcneice Jul 23 '12 at 17:11
-
I've done this in version 8.1, and the `USERNAME` env var is showing up as `SERVERNAME$`. – brianary Nov 11 '14 at 01:31
-
3From [Known Issues: Agent Running As Windows Service Limitations - TeamCity 8.x Documentation - Confluence](http://confluence.jetbrains.com/display/TCD8/Known+Issues#KnownIssues-AgentrunningasWindowsServiceLimitations): "As a Windows service, the TeamCity agent and the build processes are not able to access network shares and mapped drives." (Not sure how other CI engines such as Jenkins and TFS are able to, then.) – brianary Nov 11 '14 at 23:39
-
@MerlynMorgan-Graham Did you restart the build agent service? That's what I had to do. – sirdank Aug 18 '15 at 18:59
-
1
-
1