I've been following this document on
I already have a .nupkg file, so now I try:
$ nuget.exe push .\Test.1.2.3.nupkg -Source https://api.nuget.org/v3/index.json -Apikey <apikey>
And I keep getting:
Pushing Test.1.2.3.nupkg to 'https://www.nuget.org/api/v2/package'...
PUT https://www.nuget.org/api/v2/package/
Forbidden https://www.nuget.org/api/v2/package/ 2238ms
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.).
Why is that??
CodePudding user response:
The error message said "The specified API key is invalid, has expired, or does not have permission to access the specified package."
You can check this link
If you're using a valid API key that you just created, then this message indicates a naming conflict, which isn't entirely clear from the "permission" part of the error. Change the package identifier, rebuild the project, recreate the .nupkg file, and retry the push command.
Hope it can solve yout problem.