Closed FraserElectronics closed 5 months ago
@FraserElectronics, thanks for reaching out. I think the problem here is with the Source URL. When pushing to nuget.org, the URL will be https://www.nuget.org/api/v2/package, so it should be similar for your private deployment as well. You can try https://mynugetserver.azurewebsites.net/api/v2/package .
@skofman1 Thanks for your help - your suggestion has moved me forward but I now get the following error when try and push any nuget package.
nuget push MyExtensions.1.0.2.nupkg MyAPIKey -Source https://mynugetserver.azurewebsites.net/api/v2/package
Pushing MyExtensions.1.0.2.nupkg to 'https://mynugetserver.azurewebsites.net/api/v2/package'...
PUT https://mynugetserver.azurewebsites.net/api/v2/package/
InternalServerError https://mynugetserver.azurewebsites.net/api/v2/package/ 451ms
PUT https://mynugetserver.azurewebsites.net/api/v2/package/
InternalServerError https://mynugetserver.azurewebsites.net/api/v2/package/ 192ms
PUT https://mynugetserver.azurewebsites.net/api/v2/package/
InternalServerError https://mynugetserver.azurewebsites.net/api/v2/package/ 194ms
Response status code does not indicate success: 500 (The remote server returned an error: (409) Conflict.).
Andy
The remote server returned an error: (409) Conflict
That indicates your package was already published in one of your previous attempts. Please create a new version MyExtensions.1.0.99.nupkg and then try to publish it.
@erdembayar I had already tried pushing multiple packages that would not be there but still got the same problem. I also increased the version number of one package and that still gives the 409 Conflict error .
Andy
It looks like you're leveraging the NuGet.Server
package, but it was created before I joined the team and I'm not sure of its current status. I'll figure it out and let you know if it's still supported.
Package in question: https://www.nuget.org/stats/packages/NuGet.Server?groupby=Version&groupby=ClientName
@FraserElectronics Please move to one of the offerings here: https://learn.microsoft.com/en-us/nuget/hosting-packages/overview Fyi BaGet and Sleet are both popular alternatives, but above NuGet.Server, which is for V2 feed implementation (not the latest V3), has not been updated for a long time.
@erdembayar Okay, thanks for those references, I will have a look at them 👍
Impact
I'm unable to use this version
Describe the bug
I have built a self hosted gallery using the instructions here: https://learn.microsoft.com/en-us/nuget/hosting-packages/nuget-server
If I build and run this locally, I can push packages to it fine.
When I deploy to a WebApp on Azure it shows the URLs for package sources and how to push to the repo using the command line tools but when I enter the command :
I get the following error:
Can anyone help?
Andy
Repro Steps
See above.
Expected Behavior
I should get a successful push.
Screenshots
No response
Additional Context and logs
No response