Reputation: 1323
I have set Up a project in teamcity 8 that requires nuget package restore, and I have also added two build steps, one for the Nuget installer and for MsBuild.
Since we need to connect via a proxy, I have also set this in the Nuget.config file under the config tag using the commandline tool.
However, when I build the project inside teamcity, I am unable to restore the packages.
I get the following error:
But when I try to run the command directly from the commandline, the nuget packages are restored successfully.
Are there extra settings I need to have in teamcity in order for this to work ? I already added an enviroment variable to enable nuget package restore if that helps.
Upvotes: 2
Views: 1505
Reputation: 2657
I had a similar problem with Nuget restore - and came across this answer here: https://stackoverflow.com/a/21045126
It seems to be similar to your comment made on your original post about running as Local System.
I changed the Local System (log on) for the Agent service to be the user that I use to log onto the server. Once I ran the nuget restore again it worked. You only need to change the Agent service because the agent is the actual "worker" that runs the build steps.
Upvotes: 0
Reputation: 1269
You will most likely need a domain account to run the service as.
Have a domain account created, such as "teamcity", and then set the services to run as that user.
Then, you can log in as that user on your build agent and verify that you're able to do what you need to do, adding permissions as needed until you get it to work.
See the TeamCity documentation for more information about the permissions your user will need.
Upvotes: 0