1
votes

I am using TeamCity to build my .net application. One of the build step connects to a Nuget package repository and try to restore nuget packages. During this step, I am seeing returned an unexpected status code '401 Unauthorized error while system try to restore nuget package from a specific repository.

How can I set the credentials so that TeamCity server picks it up and pass it while accessing repository.

1

1 Answers

2
votes

Looking to the left of the build step's form-fields, under Build Configuration Settings is Build Features.

then

On the left, click on Build Features.

Click on the Add build feature button.

select NuGet Feed Credentials.

For Feed URI, enter the URL, uid and pwd