Space Packages. Get Started with NuGet feeds
Creating a feed
A feed is simply a new repository type available in Packages. Here are the steps to create one:
Open the Packages page in Space.
After you create the repository, its URL will be shown on the title bar of the repo page.
Use this URL to perform any operations with this feed: refernce packages, download and publish them, and so on.
As with any other repository, you access a NuGet feed:
- by using your Space login with a permanent token: You can create such a token in My Profile | Personal Tokens | New personal token and use it instead of your password when authenticating in Packages.
- by using a special service account: Preferred for authenticating services and applications.
Note that all authenticated accounts are allowed to access any repository in Packages.
Publishing packages from a local machine
If you already have a .nupkg file, the easiest way to publish it to the feed is to open the feed’s page in Packages and use the Upload button. The button is located next to the feed’s URL in the top right corner:
If you want to publish packages using the
nuget tool, the easiest way is to use the
push command and provide your permanent token on each command run. Note that if you use such type of authentication, you should specify the v2 feed URL instead of v3. For example, using
dotnet nuget push MyPackage.0.0.1.nupkg --source
nuget push MyPackage.0.0.1.nupkg -Source
If you don’t want to provide the token each time you access your feed, you can configure permanent access. You can do this in several ways described in Space documentation:
- Specify feed settings using dotnet or nuget command-line tools
- Specify feed settings in the NuGet configuration file
- Use Azure Artifacts Credential Provider
That’s all for today. Should you have any comments or questions, please post them below. And, of course, try Packages for yourself!
If you haven’t tried Space yet, request your EAP invite today.