You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/artifacts/cargo/cargo-upstream-source.md
+38
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,8 @@ Azure Artifacts recommends having a dedicated feed for consuming crates from cra
47
47
48
48
## Connect to your feed
49
49
50
+
::: moniker range="azure-devops"
51
+
50
52
#### [Private feed](#tab/privatefeed/)
51
53
52
54
1. Sign in to your Azure DevOps organization, and then navigate to your project.
@@ -122,6 +124,42 @@ Azure Artifacts recommends having a dedicated feed for consuming crates from cra
122
124
```
123
125
>
124
126
127
+
::: moniker-end
128
+
129
+
::: moniker range="azure-devops-2022"
130
+
131
+
1. Sign in to your Azure DevOps collection, and then navigate to your project.
132
+
133
+
1. Select **Artifacts**, and then select your feed from the dropdown menu.
134
+
135
+
1. Select **Connect to feed**, and then select **Cargo** from the left navigation pane.
136
+
137
+
1. If this is the first time using Cargo with Azure Artifacts, make sure you have installed [rustup](https://rustup.rs/).
138
+
139
+
1. Add the provided snippet from the **Project setup** section to your *.cargo/config.toml* file in your source repository:
140
+
141
+
- **Project-scoped feed**:
142
+
143
+
```
144
+
[registries]
145
+
<FEED_NAME> = { index = "sparse+https://pkgs.dev.azure.com/<COLLECTION_NAME>/<PROJECT_NAME>/_packaging/<FEED_NAME>/Cargo/index/" }
146
+
147
+
[source.crates-io]
148
+
replace-with = "<FEED_NAME>"
149
+
```
150
+
151
+
- **Collection-scoped feed**:
152
+
153
+
```
154
+
[registries]
155
+
<FEED_NAME> = { index = "sparse+https://pkgs.dev.azure.com/<COLLECTION_NAME>/_packaging/<FEED_NAME>/Cargo/index/" }
156
+
157
+
[source.crates-io]
158
+
replace-with = "<FEED_NAME>"
159
+
```
160
+
161
+
::: moniker-end
162
+
125
163
## Configure a credential provider
126
164
127
165
To use Cargo with Azure Artifacts, you need to set up a credential provider. The provided settings will configure a default credential helper for the current user:
0 commit comments