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: _contentTemplates/common/get-started.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,40 @@
21
21
22
22
#end
23
23
24
+
#generate-nuget-api-key
25
+
26
+
As the Telerik NuGet server requires authentication, the first step is to obtain an API key that you will use instead of a password. Using an API key instead of a password is a more secure approach, especially when working with the [.NET CLI](#use-the-net-cli) or a [`NuGet.Config` file](#edit-the-nugetconfig-file).
27
+
28
+
1. Go to the [API Keys](https://www.telerik.com/account/downloads/api-keys) page in your Telerik account.
29
+
1. Click **Generate New Key +**.
30
+
1. In the **Key Note** field, add a note that describes the API key.
31
+
1. Click **Generate Key**.
32
+
1. Select **Copy and Close**. Once you close the window, you can no longer copy the generated key. For security reasons, the **API Keys** page displays only a portion of the key.
33
+
1. Store the generated NuGet API key as you will need it in the next steps.
34
+
35
+
Whenever you need to authenticate your system with the Telerik NuGet server, use `api-key` as the username and your generated API key as the password.
36
+
#end
24
37
25
38
#add-nuget-feed
26
39
## Step 3: Add the Telerik NuGet Feed to Visual Studio
27
40
28
-
In this tutorial, you will use the [Telerik NuGet feed](slug:installation/nuget) to download the UI for Blazor components. This NuGet feed is private and requires you to authenticate with your Telerik user name and password:
41
+
In this tutorial, you will use the [Telerik NuGet feed](slug:installation/nuget) to download the UI for Blazor components. This NuGet feed is private and requires you to authenticate with a NuGet API key.
42
+
43
+
To generate your NuGet API key:
44
+
45
+
1. Go to the [API Keys](https://www.telerik.com/account/downloads/api-keys) page in your Telerik account.
46
+
47
+
1. Click **Generate New Key +**.
48
+
49
+
1. In the **Key Note** field, add a note that describes the API key.
50
+
51
+
1. Click **Generate Key**.
52
+
53
+
1. Select **Copy and Close**. Once you close the window, you can no longer copy the generated key. For security reasons, the **API Keys** page displays only a portion of the key.
54
+
55
+
1. Store the generated NuGet API key as you will need it in the next steps.
56
+
57
+
Next, add the Telerik NuGet feed to Visual Studio:
29
58
30
59
1. In Visual Studio and go to **Tools** > **NuGet Package Manager** > **Package Manager Settings**.
31
60
@@ -37,9 +66,9 @@ In this tutorial, you will use the [Telerik NuGet feed](slug:installation/nuget)
37
66
38
67

39
68
40
-
1. Whenever Visual Studio displays a dialog to enter credentials for `nuget.telerik.com`, use your Telerik account email and password.
69
+
1. Whenever Visual Studio displays a dialog to enter credentials for `nuget.telerik.com`, use `api-key` as the username and your NuGet API key as the password.
41
70
42
-
>tip For alternative NuGet package download options, check the [Workflow article](slug:getting-started/what-you-need). You can also [authenticate with `nuget.telerik.com` with an API key](slug:installation/nuget#use-nuget-api-key).
71
+
>tip For alternative NuGet package download options, check the [Workflow article](slug:getting-started/what-you-need).
Also see [Using NuGet Keys](slug:deployment-nuget#using-nuget-keys) in the article [Restoring NuGet Packages in Your CI Workflow](slug:deployment-nuget). It shows how to use the `TELERIK_NUGET_KEY` environment variable in your CI build environment.
127
+
Also see [Using API Keys](slug:deployment-nuget#using-api-keys) in the article [Restoring NuGet Packages in Your CI Workflow](slug:deployment-nuget). It shows how to use the `TELERIK_NUGET_KEY` environment variable in your CI build environment.
Copy file name to clipboardExpand all lines: deployment/nuget-keys.md
+15-32Lines changed: 15 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Restoring NuGet Packages in CI
3
3
page_title: Restoring NuGet Packages in CI
4
-
description: Get started with Telerik UI for Blazor and use NuGet Keys to authenticate with the Telerik NuGet server and restore packages in your CI or desktop environment.
4
+
description: Get started with Telerik UI for Blazor and use API Keys to authenticate with the Telerik NuGet server and restore packages in your CI or desktop environment.
5
5
slug: deployment-nuget
6
6
position: 10
7
7
---
@@ -10,52 +10,35 @@ position: 10
10
10
11
11
This article describes how to use token-based authentication for the Telerik NuGet feed. You will learn how to create and use NuGet API keys to restore Telerik NuGet packages in your Continuous Integration (CI) workflow.
12
12
13
-
The [Telerik NuGet server](slug:installation/nuget)provides two ways to authenticate:
13
+
When you need to restore the [Telerik NuGet packages](slug:getting-started/what-you-need#nuget-packages) as part of your CI, using API Keys provides a secure way to authenticate. This method does not require you to provide your Telerik credentials anywhere in the CI workflow. An API key has a limited scope and can be used only with the Telerik NuGet server. If any of your API Keys is compromised, you can quickly delete it and create a new one.
14
14
15
-
* Basic authentication with your Telerik username and password.
16
-
* Token-based authentication with a NuGet API key.
15
+
## Generating API Keys
17
16
18
-
When you need to restore the [Telerik NuGet packages](slug:getting-started/what-you-need#nuget-packages) as part of your CI, a NuGet API key is the more secure way to authenticate. This method does not require you to provide your Telerik credentials anywhere in the CI workflow. A NuGet Key has a limited scope and can be used only with the Telerik NuGet server. If any of your NuGet keys is compromised, you can quickly delete it and create a new one.
>warning Never check in NuGet API keys with your source code or leave them publicly visible in plain text (for example, in a `NuGet.Config` file). An API key is valuable and bad actors can use it to access the NuGet packages that are licensed under your account. A key abuse can lead to a review of the affected Telerik account.
22
22
23
-
1. In your Telerik account, go to the [**Manage NuGet Keys**](https://www.telerik.com/account/downloads/nuget-keys) page.
1. Enter a name for the NuGet Key and click **Generate Key**.
30
-
31
-
1. To copy the key, click **Copy and Close**. Once you close the popup dialog, you can no longer copy the generated key. For security reasons, the **NuGet Keys** page displays only a portion of the key.
>warning Never check in Telerik account credentials or a NuGet API key with your source code or leave them publicly visible in plain text (for example, in a `NuGet.Config` file). A NuGet key is valuable and bad actors can use it to access the NuGet packages that are licensed under your account. A key abuse can lead to a review of the affected Telerik account.
39
-
40
-
To protect the NuGet Key, store it as a secret environment variable. The exact store steps depend on your workflow and environment:
23
+
To protect the API key, store it as a secret environment variable. The exact store steps depend on your workflow and environment:
41
24
42
25
* In GitHub Actions, save the key as a [GitHub Actions Secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).
43
-
* In Azure DevOps, save the key as a [secret Azure DevOps pipeline variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/set-secret-variables). If you use an Azure DevOps Service connection instead of secret environment variables, enter `api-key` in the username field and the NuGet key as the password in the **New NuGet service connection** form editor.
26
+
* In Azure DevOps, save the key as a [secret Azure DevOps pipeline variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/set-secret-variables). If you use an Azure DevOps Service connection instead of secret environment variables, enter `api-key` in the username field and the API key as the password in the **New NuGet service connection** form editor.
44
27
* In Docker images, save the key as a [Docker secret](https://docs.docker.com/tags/secrets/).
45
28
46
-
For more details on storing and protecting your NuGet Key, check the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.
29
+
For more details on storing and protecting your API key, check the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.
47
30
48
31
The examples below assume that the secret environment variable name is `TELERIK_NUGET_KEY`.
49
32
50
33
51
-
## Using NuGet Keys
34
+
## Using API Keys
52
35
53
-
There are two common ways to use a [stored NuGet key](#storing-nuget-keys) with the Telerik NuGet server during a build:
36
+
There are two common ways to use a [stored API key](#storing-api-keys) with the Telerik NuGet server during a build:
54
37
55
-
*[Using a NuGet.Config file](#using-a-nuget-config-file)
56
-
*[Using only CLI commands](#using-net-cli-commands)
38
+
*[Use a NuGet.Config file](#using-a-nuget-config-file)
39
+
*[Use only CLI commands](#using-net-cli-commands)
57
40
58
-
For more information on how to use NuGet keys in a build, check the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.
41
+
For more information on how to use API keys in a build, check the [Announcing NuGet Keys](https://www.telerik.com/blogs/announcing-nuget-keys) blog post by Lance McCarthy.
59
42
60
43
### Using a NuGet.Config File
61
44
@@ -82,7 +65,7 @@ In your `NuGet.Config` file, set the `Username` value to `api-key` and the `Clea
82
65
83
66
### Using .NET CLI Commands
84
67
85
-
You can use the .NET CLI `add source` or `update source` commands to set the credentials of a package source. This CLI approach is applicable if your CI system doesn't support [environment variable secrets](#storing-nuget-keys) or if you do not [use a custom `NuGet.Config`](#using-a-nuget-config-file).
68
+
You can use the .NET CLI `add source` or `update source` commands to set the credentials of a package source. This CLI approach is applicable if your CI system doesn't support [environment variable secrets](#storing-api-keys) or if you do not [use a custom `NuGet.Config`](#using-a-nuget-config-file).
Copy file name to clipboardExpand all lines: getting-started/client-blazor.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ This article explains how to get the <a href = "https://www.telerik.com/blazor-u
48
48
49
49
2. Install the Telerik Blazor NuGet package:
50
50
51
-
1. Select the `telerik.com`**Package source** that you [added earlier](#step-3-add-the-telerik-nuget-feed-to-visual-studio). As this is a private NuGet feed, you must authenticate with your [Telerik account](https://www.telerik.com/account/) user name and password.
51
+
1. Select the `telerik.com`**Package source** that you [added earlier](#step-3-add-the-telerik-nuget-feed-to-visual-studio). As this is a private NuGet feed, you must authenticate using `api-key` as the username and [your NuGet API key](#step-3-add-the-telerik-nuget-feed-to-visual-studio) as the password.
52
52
1. Select the **Browse** tab, find the `Telerik.UI.for.Blazor` NuGet package, and click **Install**.
53
53
54
54

Copy file name to clipboardExpand all lines: getting-started/web-app.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ This article explains how to use the Telerik UI for Blazor components in a Blazo
62
62
63
63
1. Install the Telerik Blazor NuGet package:
64
64
65
-
1. Select the `telerik.com`**Package source** that you [added earlier](#step-3-add-the-telerik-nuget-feed-to-visual-studio). As this is a private NuGet feed, you must authenticate with your [Telerik account](https://www.telerik.com/account/) username and password.
65
+
1. Select the `telerik.com`**Package source** that you [added earlier](#step-3-add-the-telerik-nuget-feed-to-visual-studio). As this is a private NuGet feed, you must authenticate using `api-key` as the username and [your NuGet API key](#step-3-add-the-telerik-nuget-feed-to-visual-studio) as the password.
66
66
1. Select the **Browse** tab, find the `Telerik.UI.for.Blazor` NuGet package, and click **Install**.
0 commit comments