title | description | ms.technology | ms.topic | ms.date | monikerRange |
---|---|---|---|---|---|
Set up upstream sources for your feed |
How to configure upstream sources for your Azure Artifacts feeds |
devops-artifacts |
conceptual |
01/24/2022 |
>= tfs-2017 |
[!INCLUDE version-gt-eq-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.
Note
Upstream sources are not supported in public feeds.
-
From within your project, select Artifacts.
:::image type="content" source="../media/goto-feed-hub-azure-devops-newnav.png" alt-text="Screenshot of Artifacts button.":::
-
Select Create Feed.
:::image type="content" source="../media/new-feed-button-azure-devops-newnav.png" alt-text="Screenshot of the create feed button.":::
-
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.
:::image type="content" source="../media/new-feed-dialog-azure-devops.png" alt-text="Screenshot showing the create new feed window panel.":::
-
Select Create when you are done.
Important
Maven snapshots are not supported in upstream sources.
Note
Custom public upstream sources are only supported with npm registries.
-
Select Upstream sources.
-
Select Add upstream source.
-
Select Public source, and then select the Public source. (Example Maven Central (https://repo.maven.apache.org/maven2/) for Maven central)
-
Select Add when you are done.
Note
Azure Artifacts support Maven Central, Google Maven Repository, Gradle Plugins, and JitPack as upstream sources for Maven.
-
Select Upstream sources.
-
Select Add upstream source.
-
Select Azure Artifacts feed in this organization.
-
Select the feed you would like to add from the dropdown menu.
-
Select the package types you want to use, select the View and name your upstream source.
-
Select Add when you are done.
:::image type="content" source="../media/feed-org-upstream.png" alt-text="Screenshot showing how to add a feed in your organization as an upstream source.":::
Note
Universal Packages are only supported in upstream sources within the same organization.
-
Select Upstream sources.
-
Select Add upstream source.
-
Select Azure Artifacts feed in another organization.
-
Enter your Azure DevOps Services feed locator. Example: azure-feed://myOrg/myProject/myFeed@local.
-
Select the Package type(s) you want to use and enter an Upstream source name.
-
Select Add when you are done.
:::image type="content" source="../media/feed-outorg-upstream.png" alt-text="Screenshot showing how to add a feed in a different organization as an upstream source.":::
Using Visual Studio, we can now install packages from the upstream sources we configured:
- Navigate to NuGet.org, find the package you want to install, and then copy the
Install-Package
command. - In Visual Studio, select Tools > NuGet Package Manager > Package Manager Console.
- Paste the install command into the Package Manager Console and press ENTER to run it.
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.