We are using TeamCity 2017.2 and we are trying to publish our builds to our private TeamCity NuGet feed. Our project is .NET Core 2.1 and  we are using the .NET CLI (dotnet) runner with the nuget push command.

The form for creating this step requires an API key. We are using '%teamcity.nuget.feed.auth.server%' for the NuGet server and '%teamcity.nuget.feed.api.key%'  for the API Key as the form suggests. Your documentation for this process also states 'To publish to the TeamCity NuGet server, specify the %teamcity.nuget.feed.api.key% parameter.'

This step is failing with the message:

[Step 11/11] Process exited with code 1
[Step 11/11] Step CORE Nuget (.NET CLI (dotnet)) failed

The logs show:

[nuget push] info : PUT http://localhost:8111/httpAuth/app/nuget/v1/FeedService.svc/
[nuget push] info : Unauthorized http://localhost:8111/httpAuth/app/nuget/v1/FeedService.svc/ 179ms

I can't seem to find the value of this API key anywhere. There have been other posts asking the same question, but the answer has not been given.
1 comment

Same problem. Nuget publish gives unauthorised error when trying to publish to TeamCity's own nuget feed


Please sign in to leave a comment.