I'm trying to create a Release Pipeline in Azure DevOps that will publish a package to Nuget.org. The build pipeline works just fine and creates the package as the build artifact. I can publish to a feed hosted in Azure Artifacts, I just cannot publish to Nuget.org. I believe the issue is with the Service Connection. .
I've tried using the ApiKey but that throws an error
DotNet Core does not support encrypted API Key' error
Here is the release step that is attempting to push the package.
I've also tried https://api.nuget.org/v3/index.json for the Feed URL but that doesn't seem to make a difference.
Log output.
2018-10-21T23:27:36.3177322Z ##[section]Starting: Nuget Push 2018-10-21T23:27:36.3183449Z ============================================================================== 2018-10-21T23:27:36.3183547Z Task : .NET Core 2018-10-21T23:27:36.3183635Z Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet. 2018-10-21T23:27:36.3183729Z Version : 2.141.0 2018-10-21T23:27:36.3183791Z Author : Microsoft Corporation 2018-10-21T23:27:36.3183871Z Help : More Information 2018-10-21T23:27:36.3183936Z ============================================================================== 2018-10-21T23:27:37.1663123Z [command]C:\Windows\system32\chcp.com 65001 2018-10-21T23:27:37.1762529Z Active code page: 65001 2018-10-21T23:27:37.1808736Z SYSTEMVSSCONNECTION exists true 2018-10-21T23:27:37.3473599Z SYSTEMVSSCONNECTION exists true 2018-10-21T23:27:37.4707171Z SYSTEMVSSCONNECTION exists true 2018-10-21T23:27:37.4739974Z e3e8a3af-5c6c-44e9-820c-c62af0972256 exists true 2018-10-21T23:27:37.4807474Z Saving NuGet.config to a temporary config file. 2018-10-21T23:27:37.4833034Z Saving NuGet.config to a temporary config file. 2018-10-21T23:27:37.4919745Z Using authentication information for the following URI: https://www.nuget.org/api/v2/package 2018-10-21T23:27:37.4988034Z [command]C:\hostedtoolcache\windows\dncs\2.1.105\x64\dotnet.exe nuget push "{package}" --source https://www.nuget.org/api/v2/package --api-key RequiredApiKey 2018-10-21T23:27:38.3984300Z info : Pushing TranslatorConsole.1.0.0.6.nupkg to 'https://www.nuget.org/api/v2/package'... 2018-10-21T23:27:38.4171650Z info : PUT https://www.nuget.org/api/v2/package/ 2018-10-21T23:27:38.8798808Z info : Forbidden https://www.nuget.org/api/v2/package/ 462ms 2018-10-21T23:27:38.9562536Z error: Response status code does not indicate success: 403 (The specified API key is invalid, has expired, or does not have permission to access the specified package.). 2018-10-21T23:27:40.2195255Z ##[error]Error: C:\hostedtoolcache\windows\dncs\2.1.105\x64\dotnet.exe failed with return code: 1 2018-10-21T23:27:40.2206711Z ##[error]Packages failed to publish 2018-10-21T23:27:40.2307763Z ##[section]Finishing: Nuget Push