[SOLVED] Error publishing to simple NuGet.Server

Jul 14, 2011 at 8:55 PM

When I try push information to my simple NuGet server, I get the following error:

 

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <code></code>
  <message xml:lang="en-US">Resource not found for the segment 'PackageFiles'.</message>
</error>

 

Looking on the server side, I get:

Request started: GET http:///nuget
Request started: GET http:///nuget/
Request ended: "http:///nuget" with HTTP status 307.0
Request started: POST http:///nuget/PackageFiles/4003d786-cc37-4004-bfdf-c4f3e8ef9b3a/nupkg
Request ended: "http:///nuget/" with HTTP status 200.0
Request ended: "http:///nuget/PackageFiles/4003d786-cc37-4004-bfdf-c4f3e8ef9b3a/nupkg" with HTTP status 404.0
Request started: POST http:///nuget/PackageFiles/4003d786-cc37-4004-bfdf-c4f3e8ef9b3a/nupkg
Request ended: "http:///nuget/PackageFiles/4003d786-cc37-4004-bfdf-c4f3e8ef9b3a/nupkg" with HTTP status 404.0
Request started: POST http:///nuget/PackageFiles/4003d786-cc37-4004-bfdf-c4f3e8ef9b3a/nupkg
Request ended: "http:///nuget/PackageFiles/4003d786-cc37-4004-bfdf-c4f3e8ef9b3a/nupkg" with HTTP status 404.0

The actual commandline I use is:

nuget push \mypackage.nupkg 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a -s http://<SERVER>/nuget

I have set my apiKey in web.config:

  <appSettings>
    <!-- Set the value here to allow people to push/delete packages from the server.
             NOTE: This is a shared key (password) for all users. -->
    <add key="apiKey" value="4003d786-cc37-4004-bfdf-c4f3e8ef9b3a" />
  </appSettings>

I took a look at http://nuget.codeplex.com/discussions/262318?ProjectName=nuget , but the problem seems different.  I am using NuGet 1.4 (I downloaded it yesterday).  I also tried the branch specified in that post, and it had the same issues.

Any idea what I"m doing wrong?  Any help is greatly appreciated...

alanalan

Jul 15, 2011 at 1:52 PM
Edited Jul 15, 2011 at 1:56 PM

Try taking the /nuget off the command line url, assuming the feed site is on the root http://SERVER. If not, then I don't know. I'm having issues with nuget.server 1.4 as well and I suspect the packages on the official feed still have not been updated as mentioned in the discussion you linked. Edit: if you get it working and the nuget.exe command line tells you the publish succeeded, check if the .nupkg file shows up in /packages. I followed the steps verbatim and whether in IIS or the dev server, the package files never show up (despite granting everyone and their mom write access to the site directory).

Jul 15, 2011 at 3:54 PM

That totally fixed it for me!  My NuGet server is working for me now.  I swear I tried that before, but I must have made a different mistake.  Thanks so much for the speedy reply!

I wish I could help you, but I awfully new to NuGet, so I'm not sure if I have any advice:)

Jul 15, 2011 at 7:56 PM

Glad to hear it. I fixed my problem too. I was trying publish when I should have been using push. Pushing to nuget.server built out as in the docs works, imagine that.