Open aiham opened 7 years ago
I think I am hitting the same issue as #5468
Even though I set my api key:
$ nuget setApiKey REDACTED_API_KEY -source https://www.nuget.org
The API Key 'REDACTED_API_KEY' was saved for the NuGet gallery (https://www.nuget.org).
It's not being detected:
$ nuget push OpenTok.2.4.2.nupkg -Source https://www.nuget.org/api/v2/package -Verbosity detailed
NuGet Version: 4.1.0.2450
Pushing OpenTok.2.4.2.nupkg to 'https://www.nuget.org/api/v2/package'...
PUT https://www.nuget.org/api/v2/package/
Created https://www.nuget.org/api/v2/package/ 11000ms
Your package was pushed.
WARNING: Found symbols package 'OpenTok.2.4.2.symbols.nupkg', but no API key was specified for the symbol server. To save an API Key, run 'NuGet.exe setApiKey [your API key from http://www.NuGet.org]'.
WARNING: No API Key was provided and no API Key could be found for the symbol server (https://nuget.smbsrc.net/). To save an API Key for a source use the 'setApiKey' command.
Pushing OpenTok.2.4.2.symbols.nupkg to the symbol server (https://nuget.smbsrc.net/)...
PUT https://nuget.smbsrc.net/api/v2/package/
Please provide credentials for: https://www.nuget.org/api/v2/package
UserName: An error was encountered when fetching 'PUT https://nuget.smbsrc.net/'. The request will now be retried.
The HTTP request to 'PUT https://nuget.smbsrc.net/api/v2/package/' has timed out after 300000ms.
PUT https://nuget.smbsrc.net/api/v2/package/
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
Turns out the package was published successfully and now we have multiple redundant versions:
https://www.nuget.org/packages/OpenTok/2.4.0 https://www.nuget.org/packages/OpenTok/2.4.1 https://www.nuget.org/packages/OpenTok/2.4.2 https://www.nuget.org/packages/OpenTok/2.4.3
As you can see from the CLI output above there was no indication of a successful publish.
This has bit me a couple of times as well. In my case using an expired API-key causes the push to fail with a 403 error. Refreshing the key and pushing again the same packaged causes a 409 error, indicating that the particular version has already been pushed.
I am now unable to push v2.1.0 of https://www.nuget.org/packages/Altinn.ApiClients.Dan because nuget.org claims it already exists, even though there is no sign of that version anywhere.
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): nuget
NuGet version (x.x.x.xxx): 4.1.0.2450
OS version (i.e. win10 v1607 (14393.321)): macOS Sierra 10.12.5
Detailed repro steps so we can see the same problem
Ensure nuget API key is NOT set (or it may require an invalid API key to be set)
Modify the version of your package to one that's unused
nuget pack
nuget push
Observe auth error
Set nuget API key
nuget push
Observe version conflict
...
Other suggested things
I believe this is a security issue. This means I as an unauthorised individual can deny any package a particular version number, right?
Verbose Logs
Please include verbose logs (NuGet.exe -verbosity detailed | dotnet.exe --verbosity diag | etc...)
Push with auth error:
Set API KEY:
Version conflict: