Unable to push NuGet package to a local NuGet gallery

Feb 6, 2012 at 3:31 AM

I have set up a local NuGet gallery as per instructions from "Setting Up a Local NuGet Gallery" and I can access the NuGet gallery services feed (using http://myserver:portnumber/FeedService.svc/Packages).  However, I am unable to publish the package using NuGet.exe command line utility (1.6).

When I enter this command:

nuget push HelloWorld.0.5.0nupkg -s http://myserver:portnumber/

I get "Pushing HelloWorld.0.5.0nupkg to 'http://myserver:portnumber/'  ...The remote server returned an error: (404) Not Found"

What am I doing wrong?

 

Feb 6, 2012 at 4:10 AM

Note that the instructions on http://docs.nuget.org/docs/contribute/setting-up-a-local-gallery are for the old gallery, which is now obsolete (there is a comment at the top). Can you clarify whether you set up the old one or the new one?

Yes, we need to update that page to avoid confusion :)

Feb 6, 2012 at 5:04 AM

I have used the old set up.  I will try with the new setup.  Thanks.

Feb 6, 2012 at 5:07 AM

Apologies for the confusing page. We'll work to clean it up real soon. The good news is that you'll likely find the new Gallery a lot easier to set up.

Feb 7, 2012 at 1:47 AM

Can I run build the solution without installing Visual Studio as I really don't want to have to install VS 2010 on the machine?

Feb 7, 2012 at 1:55 AM

It's just msbuild, that comes with the OS, so I think this should work. Hmmm, you might get an issue with a missing Microsoft.WebApplication.targets, but that would be solvable by copying it locally.

Feb 7, 2012 at 4:35 AM

I am getting stuck when it's updating the database...

I have changed the NuGet connection string in web.config (Website folder). 

  <connectionStrings>
    <add name="NuGetGallery" connectionString="Data Source=(LOCAL);Initial Catalog=OrchardDevNuGetGallery;Password=password890;Persist Security Info=True;User ID=OrchardUser" providerName="System.Data.SqlClient" />
  </connectionStrings>

The database exists and the credentials are correct.

This machine has SQL Server 2005 installed but I didn't think it should cause an issue.

Is there another connection string I have missed updating?

Feb 7, 2012 at 5:09 AM
I don't know if this has changed, but the last time I built NuGetGallery (from source on GitHub) the build machine required a local instance of SQL Express (.\SQLEXPRESS). Not exactly sure why, but tripped us up for a couple of hours... The database specified in the web.config connection string is still the target though.

Good luck

On 07/02/2012, at 16:35, "QAmelie" <notifications@codeplex.com> wrote:

From: QAmelie

I am getting stuck when it's updating the database...

I have changed the NuGet connection string in web.config (Website folder).

<connectionStrings>
<add name="NuGetGallery" connectionString="Data Source=(LOCAL);Initial Catalog=OrchardDevNuGetGallery;Password=password890;Persist Security Info=True;User ID=OrchardUser" providerName="System.Data.SqlClient" />
</connectionStrings>

The database exists and the credentials are correct.

This machine has SQL Server 2005 installed but I didn't think it should cause an issue.

Is there another connection string I have missed updating?

Developer
Feb 7, 2012 at 4:22 PM

I think QAmelie is still using the Orchard-based gallery (going by the catalog). Could you pick up the sources from github instead? (https://github.com/nuGet/nugetGallery/)

Feb 7, 2012 at 9:14 PM
chappoo wrote:
I don't know if this has changed, but the last time I built NuGetGallery (from source on GitHub) the build machine required a local instance of SQL Express (.\SQLEXPRESS). Not exactly sure why, but tripped us up for a couple of hours... The database specified in the web.config connection string is still the target though.
Good luck

That did the trick....thank you very much

Feb 8, 2012 at 3:42 AM

I am still having some trouble with nuget push with the new setup.

This time I get the 500 internal server error.

Feb 8, 2012 at 4:28 AM

I am also encountering this error when I try to upload the package via the website. 

It fails when I click Submit package. (POST to http://myserver:portnumber/packages/verify-upload)

Any suggestions?

Developer
Feb 8, 2012 at 2:46 PM

It would help if we could get some sort of stack trace \ fiddler traces of what you get when you push or click submit.

Feb 9, 2012 at 3:12 AM
Edited Feb 9, 2012 at 3:13 AM

I'm new here.

 

_________________________

Bingo på Internet

Feb 9, 2012 at 5:51 AM

Fiddler trace would be good, but also look in the event log for the error we have some idea what is going wrong and can try to help.

Feb 9, 2012 at 9:38 PM
QAmelie wrote:

I am also encountering this error when I try to upload the package via the website. 

It fails when I click Submit package. (POST to http://myserver:portnumber/packages/verify-upload)

Any suggestions?

I found the solution for problem with uploading the package via the website here...https://github.com/NuGet/NuGetGallery/issues/400

With the nuget push, there are no errors in the event log and fiddler shows the following:

GET http://myserver:portnumber returns 200

PUT http://myserver:potnumber/api/v2/package/ returns 500