Del via


Configure upstream sources

TFS 2017

With upstream sources, you can use a single feed to store the packages you generate and the packages you consume from public registries such as npmjs.com, NuGet.org, Maven Central, and PyPI.org. Once you've enabled an upstream source, every time you install a package from the public registry, Azure Artifacts will save a copy of that package in your feed.

Create a new feed and enable upstream sources

Note

Upstream sources are not supported in public feeds.

  1. From within your project, select Artifacts.

    Screenshot of Artifacts button.

  2. Select Create Feed.

    Screenshot of the create feed button.

  3. Give your feed a Name and choose its visibility, and scope settings. Make sure you check the Include packages from common public sources checkbox to enable upstream sources.

    Screenshot showing the create new feed window panel.

  4. Select Create when you are done.

Important

Maven snapshots are not supported in upstream sources.

Enable upstream sources in an existing feed

Note

Custom public upstream sources are only supported with npm registries.

  1. Select the gear icon button to access your feed's settings.

  2. Select Upstream sources.

  3. Select Add upstream source.

  4. Select Public source, and then select the Public source. (Example Maven Central (https://repo.maven.apache.org/maven2/) for Maven central)

  5. Select Add when you are done.

Note

Azure Artifacts support Maven Central, Google Maven Repository, Gradle Plugins, and JitPack as upstream sources for Maven.

Add a feed in your organization as an upstream source

  1. Select the gear icon button to access your feed's settings.

  2. Select Upstream sources.

  3. Select Add Upstream.

  4. Select Azure Artifacts feed in this organization.

  5. Select the feed you would like to add from the dropdown menu.

  6. Select the package types you want to use, select the View and name your upstream source.

  7. Select Save when you are done.

    A screenshot showing how to add a feed in your organization as an upstream source.

Add a feed in a different organization as an upstream source

Note

Universal Packages are only supported in upstream sources within the same organization.

  1. Select the gear icon button to access your feed's settings.

  2. Select Upstream sources.

  3. Select Add Upstream.

  4. Select Azure Artifacts feed in another organization.

  5. Enter your Azure DevOps Services feed locator. Example: azure-feed://myOrg/myProject/myFeed@local.

  6. Select the Package type(s) you want to use and enter an Upstream source name.

  7. Select Save when you are done.

    A screenshot showing how to add a feed in a different organization as an upstream source.

Example: install NuGet packages from upstream sources with Visual Studio

Using Visual Studio, we can now install packages from the upstream sources we configured:

  1. Navigate to NuGet.org, find the package you want to install, and then copy the Install-Package command.
  2. In Visual Studio, select Tools > NuGet Package Manager > Package Manager Console.
  3. Paste the install command into the Package Manager Console and press ENTER to run it.

Example: install npm packages from upstream sources using the CLI

Run the following command in an elevated command prompt window to install your npm package from upstream.

npm install --save <package>

Note

You must be a Collaborator, a Contributor, or an Owner to install new packages from upstream. A copy of each upstream package is saved to the feed on first use. Packages already saved from upstream sources can be used by feed Readers.