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
description: Learn how to use API Keys to authenticate with the Telerik NuGet server and restore Telerik Document Processing packages in your CI or desktop environment.
Using API Keys provides a secure way to authenticate. This method does not require you to provide your Telerik credentials anywhere. Unlike your Telerik credentials, 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
+
15
+
1. Go to the [API Keys](https://www.telerik.com/account/downloads/api-keys) page in your Telerik account.
16
+
17
+
1. Click **Generate New Key +**.
18
+
19
+

20
+
21
+
1. In the **Key Note** field, add a note that describes the API key.
22
+
23
+
1. Click `Generate Key`.
24
+
25
+

26
+
27
+
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.
28
+
29
+

30
+
31
+
>note The illustrated API key above is used just for demonstration purposes and it is not valid!
32
+
33
+

34
+
35
+
>important The validity of the API key is 2 years.
36
+
37
+
1. Store the generated NuGet API key as you will need it in the next steps. 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.
38
+
39
+
## See Also
40
+
41
+
*[Restoring NuGet Packages in Your CI Workflow]({%slug using-nuget-keys%})
42
+
*[Install using NuGet Packages]({%slug installation-nuget-packages%})
Copy file name to clipboardExpand all lines: getting-started/Installation/install-nuget-packages.md
+35-1Lines changed: 35 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,25 @@ This approach allows you to setup a local NuGet package source, so you can insta
49
49
50
50
## Download from the NuGet server
51
51
52
-
Before you can install Telerik NuGet packages, you must configure the Telerik NuGet server (https://nuget.telerik.com/v3/index.json) as a package source in Visual Studio:
52
+
To install the Telerik Document Processing Libraries, you can use the NuGet packages hosted on the public Telerik NuGet server. This online source lets you download and install various versions of the Document Processing libraries and enables quick updates with minimal manual intervention.
53
+
54
+
Before adding the Telerik NuGet server to Visual Studio, make sure you have:
55
+
56
+
* A commercial or trial license that includes Document Processing. Note that the Telerik NuGet server requires authentication and checks if you have a valid license.
57
+
58
+
* Generate an API key - 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 .NET CLI or the NuGet.Config file.
59
+
60
+
### Generate an API Key
61
+
62
+
As the Telerik NuGet server requires authentication, the first step is to [obtain an API key]({%slug generating-api-keys%}) 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 .NET CLI or the NuGet.Config file.
63
+
64
+
### Add the Telerik NuGet Package Source to Visual Studio
65
+
66
+
Before you can install Telerik NuGet packages, you must configure the Telerik NuGet server as a package source in Visual Studio:
67
+
68
+
```
69
+
https://nuget.telerik.com/v3/index.json
70
+
```
53
71
54
72
1\. In the Visual Studio Solution Explorer, right-click a Project, select **Manage NuGet Packages...**, and then select the **Settings** icon:
55
73
@@ -67,6 +85,22 @@ Before you can install Telerik NuGet packages, you must configure the Telerik Nu
You have successfully added the Telerik NuGet feed as a Package source.
89
+
90
+
### Reset Store Credentials
91
+
92
+
If you previously stored credentials for the Telerik NuGet server, you need to reset them to be able to authenticate with your new API key. Here are the steps you need to follow:
93
+
94
+
1. Remove the saved credentials in the [Windows Credential Manager](https://support.microsoft.com/en-us/windows/accessing-credential-manager-1b5c916a-6a16-889f-8581-fc16e8165ac0). These credentials will appear as `nuget.telerik.com` or `VSCredentials_nuget.telerik.com` entries.
95
+
2. Remove the Telerik NuGet package source from Visual Studio.
96
+
3. If you have added the Telerik package source by using the .NET CLI, try to remove it by running the following commands:
97
+
*[`dotnet nuget list source`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-list-source)
4. Check if you have any credentials stored in `%AppData%\NuGet\Nuget.Config`. If so, remove them.
100
+
5. Try to reset the Visual Studio user data by [forcing NuGet to ask for authentication](https://stackoverflow.com/questions/43550797/how-to-force-nuget-to-ask-for-authentication-when-connecting-to-a-private-feed).
101
+
6. Restart Visual Studio.
102
+
7. Add the Telerik NuGet package source again through Visual Studio or .NET CLI. If you are using the Telerik NuGet feed in a .NET Core application, use a NuGet API key in the NuGet.Config file]({%slug telerik-nuget-source%}#edit-the-nugetconfig-file).
103
+
70
104
## See Also
71
105
72
106
*[Restoring NuGet Packages in Your CI Workflow]({%slug using-nuget-keys%})
Copy file name to clipboardExpand all lines: getting-started/Installation/nuget-keys.md
+12-37Lines changed: 12 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,64 +3,39 @@ title: Restoring NuGet Packages in CI
3
3
page_title: Restoring NuGet Packages in CI
4
4
description: Learn how to use NuGet Keys to authenticate with the Telerik NuGet server and restore Telerik Document Processing packages in your CI or desktop environment.
This article provides an overview of the most popular approaches for using token-based authentication to restore Telerik NuGet packages in your CI (Continuous Integration) workflow.
13
+
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.
14
14
15
-
The Telerik NuGet server allows you to authenticate by using two methods:
15
+
When you need to restore the [Telerik NuGet packages]({%slug installation-nuget-packages%}#download-from-the-nuget-server) 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.
16
16
17
-
* Basic authentication by providing your Telerik user name and password.
18
-
* Token-based authentication by providing a NuGet Key.
17
+
## Generating API Keys
19
18
20
-
When you need to restore Telerik NuGet packages as part of your CI, using NuGet keys is the more secure way to authenticate. This method does not require you to provide your Telerik username and password anywhere in the CI workflow.
21
-
22
-
Unlike your Telerik credentials, 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.
23
-
24
-
## Generating NuGet Keys
25
-
26
-
1. Go to the [**Manage NuGet Keys**](https://www.telerik.com/account/downloads/nuget-keys) page in your Telerik account.
27
-
28
-
1. Alternatively, select the **Downloads** tab from your Telerik account and then **NuGet Keys**.
1. To copy the key, select **Copy and Close**. Once you close the window, you can no longer copy the generated key. For security reasons, the **NuGet Keys** page displays only a portion of the key.
As the Telerik NuGet server requires authentication, the first step is to [obtain an API key]({%slug generating-api-keys%}) 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 .NET CLI or the NuGet.Config file.
46
20
47
21
## Storing a NuGet Key
48
22
49
-
> Never checkin a NuGet Key with your source code or leave it publicly visible in plain text, for example, as a raw key value in a `nuget.config` file. A NuGet Key is valuable as bad actors can use it to access the NuGet packages that are licensed under your account. A potential key abuse could lead to a review of the affected account.
23
+
> Never check-in NuGet API Keys with your source code or leave it publicly visible in plain text, for example, as a raw key value in a `nuget.config` file. A NuGet API Key is valuable as bad actors can use it to access the NuGet packages that are licensed under your account. A potential key abuse could lead to a review of the affected account.
50
24
51
25
To protect the NuGet Key, store it as a secret environment variable. The exact steps depend on your workflow:
52
26
53
-
* In GitHub Actions, save the key as a GitHub Actions Secret. Go to **Settings** > **Security** > **Secrets** > **Actions** > **Add new secret**.
27
+
* In GitHub Actions, save the key as a [GitHub Actions Secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions). Go to **Settings** > **Security** > **Secrets** > **Actions** > **Add new secret**.
54
28
55
-
* In Azure DevOps Classic, save the key as a secret pipeline variable. Go to the **Variables** tab and then select **Pipeline variables**.
29
+
* 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.
56
30
57
31
* In Azure DevOps YAML pipelines, save the key as a secret variable as well. Click the YAML editor's **Variables** button and complete the **New variable** form.
58
32
59
-
If you use Azure DevOps Service connection instead of secret environment variables, enter `api-key` in the username filed and the NuGet Key as the password in the **New NuGet service connection** form editor.
33
+
* In Docker images, save the key as a [Docker secret](https://docs.docker.com/tags/secrets/).
60
34
61
-
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.
35
+
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.
36
+
The examples below assume that the secret environment variable name is `TELERIK_NUGET_KEY`.
62
37
63
-
## Using a NuGet Key
38
+
## Using a NuGet API Key
64
39
65
40
There are two popular ways to use the Telerik NuGet server in a build:
Copy file name to clipboardExpand all lines: getting-started/Installation/telerik-nuget-source.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,8 +119,8 @@ To edit a `NuGet.Config` file and add the Telerik feed, you need to:
119
119
</packageSources>
120
120
<packageSourceCredentials>
121
121
<TelerikOnlineFeed>
122
-
<add key="Username" value="<TELERIK EMAIL or api-key>" />
123
-
<add key="ClearTextPassword" value="<TELERIK PASSWORD or NUGET API KEY>" />
122
+
<add key="Username" value="api-key" />
123
+
<add key="ClearTextPassword" value="Your API KEY" />
124
124
</TelerikOnlineFeed>
125
125
</packageSourceCredentials>
126
126
</configuration>
@@ -131,7 +131,9 @@ To edit a `NuGet.Config` file and add the Telerik feed, you need to:
131
131
There are two ways to authenticate with the Telerik NuGet server when you add the Telerik NuGet source [with the .NET CLI](#use-the-net-cli) or [edit the `NuGet.Config` file manually](#edit-the-nuget-config-file):
132
132
133
133
* Use your Telerik account email as the username, and your Telerik password.
134
-
* Use `api-key` as the username and your personal [NuGet API Key]({%slug using-nuget-keys%}) as the password.
134
+
* Use `api-key` (**recommended**) as the **username** and your personal [NuGet API Key]({%slug using-nuget-keys%}) as the password.
135
+
136
+
>important Using an API key minimizes the risk of exposing client credentials when configuring NuGet access. User credentials grant full access to the user account, while the API key limits access to the NuGet feed only.
135
137
136
138
You can [generate your Telerik NuGet API Key on telerik.com](https://www.telerik.com/account/downloads/nuget-keys). Read more about [Restoring NuGet Packages in Your CI Workflow]({%slug using-nuget-keys%}).
0 commit comments