1

Closed

Nuget.exe 1.6 push to Nuget.Server 1.6 has broken url

description

Given an instance of Nuget.Server hosted in IIS 7.5 at http://nugetserver/ then version 1.5 of both nuget.exe and Nuget.Server would work with this push command:

nuget push <path to nupkg file> <api key> -s http://nugetserver/ However, using version 1.6 of both nuget.exe and Nuget.Server the same command prompts for user credentials even though the server completely configured for anonymous access. Fiddler shows nuget.exe makes a PUT request to "/" and gets a 401 response.

Changing the push url to the following instead works for v1.6:

nuget push <path to nupkg file> <api key> -s http://nugetserver/api/v2/package/
Closed Mar 16, 2012 at 9:13 PM by howarddierking
from the thread, it looks like this is resolved. Please reactivate if you're still seeing the problem.

comments

pranavkm wrote Dec 21, 2011 at 6:05 PM

This problem occurs because we conditionally append the /api/v2/package segement if the source url does not have a path portion. My guess is your server is hosted in a virtual directory under the site root (or something equivalent).

jstangroome wrote Dec 21, 2011 at 8:04 PM

pranavkm wrote Dec 21, 2011 at 8:43 PM

Just pushed a fix for this. I'm going to test it a bit more before pushing a new version of NuGet.Server if it looks alright.

pranavkm wrote Dec 21, 2011 at 9:31 PM

Could you try updating the NuGet.Server package?

jstangroome wrote Dec 21, 2011 at 11:21 PM

After updating to Nuget.Server 1.6.1, I can now use "nuget push" properly now but the build and revision numbers shown on the welcome page (ie "You are running NuGet.Server v1.6.x.y") are now 0.0 when they used to be 21205.9031.

pranavkm wrote Dec 22, 2011 at 12:02 AM

Ignore the build number - that's a builds from my dev box. On the CI, NuGet.Server is built against a strong named version of NuGet.Core and it's a bit tricky to get it to use a specific version.