Chris Melvin
Chris Melvin

Reputation: 41

Downloading NuGet packages for self hosted feed

The NuGet web site has an excellent article for hosting your own NuGet feed. In our case we are an IT shop that needs to fully vet packages before making them available to our development staff so we would like to host our own feed which will provide "approved packages". One thing the article glosses over is how to pull down the nuget packages for hosting. So for example if we want to host EntityFramework 5.0.0 so our developers can use it how do we get the package without using NuGet as policy prevents NuGet accessing hosts past our firewall?

Upvotes: 4

Views: 910

Answers (3)

Tod Hoven
Tod Hoven

Reputation: 476

Assuming you're not completely cut off from nuget.org, you could use ProGet to host your network's feed. Since ProGet allows you to both create multiple feeds and also to connect to other NuGet feeds, you could create one feed, say "NuGet Cached", and then a "Developer" feed, and specify the same package storage location for both feeds. The trick would be to set up a connector to nuget.org on the "NuGet Cached" feed, then use the Pull Package feature to download the hosted NuGet packages to your local feed.

This way, developers would set up Visual Studio (or whatever tool they use to get the packages) to point to the "Developer" feed which only has the packages you have explicitly pulled down (since both feeds store packages in the same location). You could also add deny privileges to the "NuGet Cached" feed such that they can't connect to it at all.

Upvotes: 3

maartenba
maartenba

Reputation: 3384

You can probably try out http://www.myget.org or use any of the other software out there.

Upvotes: 1

Brad Christie
Brad Christie

Reputation: 101604

  1. Create a host server (sounds like you have, but if not it's installing and hosting a NuGet.Service).
  2. Confirm it's working by visiting the host (should see a very simple dashboard saying the Nuget service number, etc)
  3. open VisualStudio options, "Pakcage Manager"->"Package Sources"
  4. Add your internal host here (probably something like http://internalsvr/nuget)

Then you should be able to install packages form that source locally. also, you can push things up there, or place the packages in the ~/packages/ directory and they will automatically be listed in the service.

Upvotes: 1

Related Questions