Skip to content

Commit 5d0fbd0

Browse files
committed
Nuget with feed
1 parent 8d95a81 commit 5d0fbd0

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

docs/artifacts/includes/generate-pat.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ ms.technology: devops-cicd
44
ms.manager: mijacobs
55
ms.author: rabououn
66
author: ramiMSFT
7-
ms.date: 02/19/2020
7+
ms.date: 03/24/2020
88
---
9-
Generate a Personal Access Token (PAT) using the instructions [here](../../organizations/accounts/use-personal-access-tokens-to-authenticate.md). Scope your PAT to the organization(s) you want to access and to one of the following scopes: *Packaging (read)*, *Packaging (read and write)*, or *Packaging (read, write, and manage).*
9+
Generate a Personal Access Token (PAT) using the instructions [Authenticate access with personal access tokens](../../organizations/accounts/use-personal-access-tokens-to-authenticate.md). Scope your PAT to the organization(s) you want to access and to one of the following scopes: *Packaging (read)*, *Packaging (read and write)*, or *Packaging (read, write, and manage).*
1010

11-
> We strongly recommend **not checking your PAT into source control**; anyone with access to your PAT can interact with Azure DevOps Services as you.
11+
> [!NOTE]
12+
> We strongly recommend **not checking your PAT into source control**. Anyone with access to your PAT can gain access to your Azure DevOps Services.

docs/artifacts/nuget/nuget-exe.md

+24-22
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Authenticating to feeds with NuGet in Azure DevOps Services
44
ms.assetid: 10665DBC-846E-4192-8CAB-D5A4C6E40C65
55
ms.technology: devops-artifacts
66
ms.topic: conceptual
7-
ms.date: 09/01/2017
7+
ms.date: 03/24/2020
88
monikerRange: '>= tfs-2018'
99
---
1010

@@ -18,7 +18,7 @@ monikerRange: '>= tfs-2018'
1818
[!INCLUDE [nuget-recommended-version](../includes/nuget/nuget-recommended-version.md)]
1919

2020
## Add a feed to NuGet 4.8.2 or later
21-
NuGet 4.8.2 and later supports the Azure Artifacts Credential Provider, which automatically acquires feed credentials when needed.
21+
NuGet 4.8.2 and later supports the Azure Artifacts Credential Provider, which automatically acquires feed credentials when needed. For more information on using credential providers with NuGet, see [Creating a NuGet credential provider](/nuget/reference/extensibility/nuget-exe-credential-providers#creating-a-nugetexe-credential-provider).
2222

2323
1. Navigate to your feed ([or create a feed if you haven't](../feeds/create-feed.md)).
2424

@@ -27,12 +27,12 @@ NuGet 4.8.2 and later supports the Azure Artifacts Credential Provider, which au
2727
::: moniker range=">= azure-devops-2019"
2828

2929
> [!div class="mx-imgBorder"]
30-
>![Connect to feed button in the upper-right of the page](../media/connect-to-feed-azure-devops-newnav.png)
30+
>![Connect to feed button in the upper right of the page](../media/connect-to-feed-azure-devops-newnav.png)
3131
>
3232
3333
3. Select **NuGet.exe** under the **NuGet** header
3434

35-
4. Select **Get the tools** in the top right corner
35+
4. Select **Get the tools** in the top-right corner
3636

3737
5. Follow steps **1** and **2** to download the latest NuGet version and the credential provider.
3838

@@ -49,7 +49,7 @@ NuGet 4.8.2 and later supports the Azure Artifacts Credential Provider, which au
4949

5050
::: moniker range="<= tfs-2018"
5151

52-
![Connect to feed button in the upper-right of the page](../media/connect-to-feed.png)
52+
![Connect to feed button in the upper right of the page](../media/connect-to-feed.png)
5353

5454
3. Follow steps 1, 2, and 3 to get the tools, add the feed to your local NuGet configuration, and push the package.
5555

@@ -59,6 +59,8 @@ NuGet 4.8.2 and later supports the Azure Artifacts Credential Provider, which au
5959

6060
Then, run any [nuget command](/nuget/tools/nuget-exe-cli-reference).
6161

62+
::: moniker range="azure-devops-2019"
63+
6264
## Add a feed to NuGet 2
6365
NuGet 2 uses Personal Access Tokens to access feeds.
6466

@@ -67,45 +69,45 @@ To use a 2.x client, first get the v3 feed URL:
6769
1. Navigate to your feed ([or create a feed if you haven't](../feeds/create-feed.md)).
6870

6971
2. Select **Connect to feed**:
70-
71-
::: moniker range=">= azure-devops-2019"
7272

7373
> [!div class="mx-imgBorder"]
7474
>![Connect to feed button in the upper-right of the page](../media/connect-to-feed-azure-devops-newnav.png)
7575
>
76+
3. Copy the NuGet package source URL:
77+
78+
> [!div class="mx-imgBorder"]
79+
>![NuGet Package source URL in the Connect to feed dialog](../media/nuget-consume-url-azure-devops-newnav.png)
80+
>
7681
7782
::: moniker-end
7883

7984
::: moniker range="<= tfs-2018"
8085

81-
![Connect to feed button in the upper-right of the page](../media/connect-to-feed.png)
86+
## Add a feed to NuGet 2
87+
NuGet 2 uses Personal Access Tokens to access feeds.
8288

83-
::: moniker-end
84-
85-
3. Copy the NuGet package source URL:
89+
To use a 2.x client, first get the v3 feed URL:
8690

87-
::: moniker range=">= azure-devops-2019"
91+
1. Navigate to your feed ([or create a feed if you haven't](../feeds/create-feed.md)).
8892

89-
> [!div class="mx-imgBorder"]
90-
>![NuGet Package source URL in the Connect to feed dialog](../media/nuget-consume-url-azure-devops-newnav.png)
91-
>
93+
2. Select **Connect to feed**:
9294

93-
::: moniker-end
95+
![Connect to feed button in the upper-right of the page](../media/connect-to-feed.png)
9496

95-
::: moniker range="<= tfs-2018"
97+
3. Copy the NuGet package source URL:
9698

9799
![NuGet Package source URL in the Connect to feed dialog](../media/nuget-consume-url.png)
98100

99-
::: moniker-end
100-
101+
::: moniker-end
102+
101103
Then, at the end of the URL, replace `/v3/index.json` with `/v2`.
102104

103105
[!INCLUDE [generate-pat](../includes/generate-pat.md)]
104106

105107
Run
106108

107-
```no-highlight
108-
nuget.exe sources add -name {your feed name} -source {your feed URL} -username {anything} -password {your PAT}
109+
```Command
110+
nuget sources add -name {your feed name} -source {your feed URL} -username {anything} -password {your PAT}
109111
```
110112

111-
Then, run any [nuget command](/nuget/tools/nuget-exe-cli-reference).
113+
Then, run any [NuGet command](/nuget/tools/nuget-exe-cli-reference).

0 commit comments

Comments
 (0)