Skip to content

Commit 283df35

Browse files
Merge pull request #8938 from MicrosoftDocs/artifacts/370448
Upstream from internal feed
2 parents d166fdd + e4912f8 commit 283df35

7 files changed

Lines changed: 150 additions & 0 deletions
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
---
2+
title: Set up an internal feed as an upstream source
3+
description: Learn how to set up an internal feed as an upstream source in Azure Artifacts.
4+
ms.service: azure-devops-artifacts
5+
ms.topic: tutorial
6+
ms.date: 02/26/2026
7+
monikerRange: "<=azure-devops"
8+
---
9+
10+
# Set up an internal feed as an upstream source
11+
12+
[!INCLUDE [version-lt-eq-azure-devops](../../includes/version-lt-eq-azure-devops.md)]
13+
14+
Azure Artifacts upstream sources simplify package management by enabling developers to store packages from multiple sources in a single feed.
15+
When a package is installed for the first time from an upstream source, Azure Artifacts automatically saves a copy to your feed to ensure continued access, even if the upstream source becomes temporarily unavailable. This tutorial walks you through how to set up an internal feed from the same organization as an upstream source in Azure Artifacts.
16+
17+
## Prerequisites
18+
19+
| **Product** | **Requirements** |
20+
|--------------------|---------------------------|
21+
| **Azure DevOps** | - An Azure DevOps [organization](../../organizations/accounts/create-organization.md).<br>- An Azure DevOps [project](../../organizations/projects/create-project.md). |
22+
23+
## Create a feed
24+
25+
If you don’t already have a feed, follow these steps to create one and add common public registries as upstream sources:
26+
27+
1. Sign in to Azure DevOps and go to your project.
28+
29+
1. Select **Artifacts**, then select **Create feed**.
30+
31+
1. Enter a **Name** for the feed and choose the appropriate **Visibility** and **Scope** settings.
32+
33+
1. Select **Include packages from common public sources** to add common public registries as upstream sources.
34+
35+
1. Select **Create** when you're done.
36+
37+
## Connect to your feed
38+
39+
Use the following steps to configure your project and authenticate with your feed. This example uses a Rust project. For other technologies, see the project setup links in the following section.
40+
41+
1. Sign in to Azure DevOps, and go to your project.
42+
43+
1. Select **Artifacts**, choose your feed from the dropdown menu, and then select **Connect to feed**.
44+
45+
:::image type="content" source="../media/select-feed-dropdown.png" alt-text="A screenshot displaying how to select a feed from the dropdown list in Azure Artifacts.":::
46+
47+
1. From the left navigation pane, select **Cargo**.
48+
49+
1. In the **Project setup** section, copy the first snippet and add it to the *cargo/config.toml* file in your source repository. Your *config.toml* file should resemble the following:
50+
51+
```
52+
[registries]
53+
FEED_NAME = { index = "sparse+https://pkgs.dev.azure.com/ORGANIZATION_NAME/PROJECT_NAME/_packaging/FEED_NAME/Cargo/index/" }
54+
```
55+
56+
1. [Configure a credential provider](../cargo/project-setup-cargo.md#configure-a-credential-provider)
57+
58+
1. [Log in to the registry](../cargo/project-setup-cargo.md#log-in-to-the-registry)
59+
60+
#### Project setup for other package types
61+
62+
If you’re using a different technology, use the links below to follow the appropriate project setup guidance to connect to your feed:
63+
64+
::: moniker range="azure-devops"
65+
66+
- [NuGet](../nuget/nuget-exe.md)
67+
- [Npm](../npm/npmrc.md)
68+
- [Maven](../maven/project-setup-maven.md)
69+
- [Python](../python/project-setup-python.md)
70+
- [Universal Packages](../universal-packages/project-setup-universal-packages.md)
71+
72+
::: moniker-end
73+
74+
::: moniker range="azure-devops-2022"
75+
76+
- [NuGet](../nuget/nuget-exe.md)
77+
- [Npm](../npm/npmrc.md)
78+
- [Maven](../maven/project-setup-maven.md)
79+
- [Python](../python/project-setup-python.md)
80+
81+
::: moniker-end
82+
83+
## Set up the upstream feed
84+
85+
Follow these steps to set up an internal feed from the same organization as an upstream source:
86+
87+
1. Sign in to Azure DevOps, then navigate to your project.
88+
89+
1. Select Artifacts, then select the feed you created earlier from the feed dropdown menu.
90+
91+
1. Select the gear icon button![gear icon](../../media/icons/gear-icon.png) to navigate to **Feed settings**.
92+
93+
1. Select **Upstream sources**, then select **Add Upstream**.
94+
95+
1. On the **Type** tab, select **Azure Artifacts feed in this organization**.
96+
97+
1. On the **Configuration** tab, from the **Feed** dropdown menu, select the feed you want to add as an upstream source. Select the desired **View**, then choose the **Package type(s)** to include, and optionally update the **Upstream source name**.
98+
99+
1. Select **Add** when you're done.
100+
101+
:::image type="content" source="../media/new-internal-feed-upstream-source.png" alt-text="A screenshot showing how to add a new internal feed as an upstream source in Azure Artifacts.":::
102+
103+
1. Select **Save** to apply your changes.
104+
105+
:::image type="content" source="../media/save-upstream-sources.png" alt-text="A screenshot showing how to save upstream sources in Azure Artifacts.":::
106+
107+
## Install packages from upstream
108+
109+
The following example illustrates a scenario where *Test_Feed* has *CargoDemoFeed* configured as an upstream source. For demonstration purposes *Test_Feed* is empty and contains no packages.
110+
111+
When a collaborator (or higher) installs a package from *Test_Feed* that is available in the upstream *CargoDemoFeed*, Azure Artifacts copies that package into the downstream *Test_Feed* and downloads it as part of the normal `cargo install` flow. After this first-time copy, all future downloads of that package from *Test_Feed* require only **Feed Reader** (or higher) permissions, because those later downloads don't modify the downstream feed. Only the first install copies the package from upstream to downstream, so only that initial action requires elevated permissions.
112+
113+
1. Sign in to Azure DevOps, then navigate to the project that hosts the upstream feed (in this example, *CargoDemoFeed*).
114+
115+
1. Select Artifacts, then from the dropdown menu, select the upstream feed (*CargoDemoFeed*).
116+
117+
1. Find the package you want to install and note its name. In this example, *atomic-waker* is the package name. You can also search upstream packages directly from your downstream feed in the Azure Artifacts UI. See [Search packages from upstream sources](search-upstream.md) for more details.
118+
119+
1. Navigate to the root of your project and open your *Cargo.toml*. Add the package under **[dependencies]**. Because this is a private crate dependency, you must specify the registry name in your *Cargo.toml* file. Cargo assumes *crates.io* as the default registry unless otherwise specified. Add the dependency as follows:
120+
121+
```
122+
CRATE_NAME = { version = "VERSION_NUMBER", registry = "FEED_NAME" }
123+
124+
# Example:
125+
# [dependencies]
126+
# atomic-waker = { version = "1.1.2", registry = "Test_Feed" }
127+
```
128+
129+
1. Open a local command prompt, navigate to the root of your project, and run the following command to build your project and download the crate:
130+
131+
```
132+
cargo build
133+
```
134+
135+
1. Once the build completes, return to **Azure DevOps** > **Artifacts** and select your consuming feed (in this example, *Test_Feed*).
136+
137+
1. Verify that the package you installed locally now appears in your downstream feed. Azure Artifacts automatically saves a copy of the package when it’s installed from an upstream source.
138+
139+
:::image type="content" source="../media/package-saved-from-internal-upstream.png" alt-text="A screenshot showing a package saved from an internal upstream in Azure Artifacts." lightbox="../media/package-saved-from-internal-upstream.png":::
140+
141+
## Related content
142+
143+
- [Safeguard against malicious public packages](../concepts/upstream-behavior.md)
144+
145+
- [Use packages from Maven Central](../maven/upstream-sources.md)
146+
147+
- [Manage permissions](../feeds/feed-permissions.md)
31.2 KB
Loading
20.2 KB
Loading
33.2 KB
Loading
26.3 KB
Loading
52.7 KB
Loading

docs/artifacts/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@
210210
- name: Set up upstream sources
211211
displayName: configure, upstreams
212212
href: how-to/set-up-upstream-sources.md
213+
- name: Upstream from internal feeds
214+
href: how-to/upstream-internal-feed.md
215+
displayName: upstream, internal feed
213216
- name: Use upstream sources with public feeds
214217
displayName: upstream, public feed
215218
href: how-to/public-feeds-upstream-sources.md

0 commit comments

Comments
 (0)