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
Make the API key the primary NuGet auth method (#1876)
* Make the API key the primary NuGet auth method
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Address comments (add tab in front of code snippets)
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: getting-started/installation/adding-private-nuget-feed.md
+24-35Lines changed: 24 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,23 @@ position: 5
13
13
14
14
Telerik maintains a publicly accessible NuGet server, providing a collection of NuGet packages to authenticated users. You can add the NuGet feed to your system by using [Visual Studio's NuGet package manager](#setup-in-visual-studio) or the [NuGet CLI](#setup-with-nuget-cli).
15
15
16
-
To access the NuGet server, you need an active license for Telerik Reporting (trial or commercial).
16
+
To access the NuGet server, you need an active license for Telerik Reporting (trial or commercial) and an API key that you will use instead of a password.
17
+
18
+
## Generate an API Key
19
+
20
+
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]({% slug using-nuget-keys %}#using-only-cli-commands) or the [`NuGet.Config` file]({% slug using-nuget-keys %}#using-a-nugetconfig-file-with-your-projects).
21
+
22
+
1. Go to the [API Keys](https://www.telerik.com/account/downloads/api-keys) page in your Telerik account.
23
+
1. Click **Generate New Key +**.
24
+
25
+

26
+
27
+
1. In the **Key Note** field, add a note that describes the API key.
28
+
1. Click **Generate Key**.
29
+
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.
30
+
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.
31
+
32
+
>API keys expire after two years. Telerik will send you an email when a key is about to expire, but we recommend that you set your own calendar reminder with information about where you used that key: file paths, project links, AzDO and GitHub Action variable names, and so on.
17
33
18
34
## Setup in Visual Studio
19
35
@@ -28,13 +44,12 @@ To access the NuGet server, you need an active license for Telerik Reporting (tr
28
44
1. Create or load your project.
29
45
1. Go to __Tools__ > __NuGet Package Manager__ > __Manage NuGet Packages for solution__.
30
46
1. In the upper right-hand corner of the __Manage Packages for Solution__ window, select the Telerik __Package source__ that you just added.
31
-
1. Depending on your Visual Studio version, choose the __Online__ or __Browse__ list of packages.
32
-
1. In the Windows **Authentication** dialog, enter your Telerik credentials. For example, **user: my.name@my.company.com** and **password: myPassPhraseForTelerikDotCom**.
33
-
1. Enter your credentials only once by selecting the __Remember my password__ checkbox. You may need to escape some [special characters in the password](#handling-special-characters-in-password).
47
+
1. Click the **Browse** tab to see the available packages.
48
+
1. In the authentication window, enter `api-key` in the **User name** field and the [generated API key](#generate-an-api-key) in the **Password** field.
34
49
35
50
>caption Enter your Telerik.com credentials to access the Telerik NuGet feed
36
51
37
-

52
+

38
53
39
54
After adding the Telerik server, all packages licensed to the authenticated user become available in the Visual Studio NuGet package manager.
40
55
@@ -44,48 +59,22 @@ If you work with Visual Studio Code on Linux or Mac OS, use the Nuget CLI to set
44
59
45
60
1. Download the latest [NuGet executable](https://dist.nuget.org/win-x86-commandline/latest/nuget.exe).
46
61
1. Open a Command Prompt and change the path to the `nuget.exe` location.
47
-
1. The command from the example below stores a token in the `%AppData%\NuGet\NuGet.config` file. Your original credentials cannot be obtained from this token.
> Encrypted passwords are only supported on Windows.
63
-
64
-
If you have already stored a token instead of storing the credentials as clear text, update the definition in the `%AppData%\NuGet\NuGet.config` file by using the following command:
70
+
To update expired or invalid login credentials, update the definition in the `%AppData%\NuGet\NuGet.config` file by using the following command:
If your password contains a special character, those characters need to be escaped or it may fail authentication resulting in *Error 401 login failure* from the NuGet server. A common character that needs to be escaped is the ampersand (`&`), but it can be as unique as the section character (`§`). There are two ways to handle this.
76
-
77
-
1. Change the password so that it only includes characters that do not need to be escaped
78
-
1. HTML encodes the password so the special characters are escaped (e.g. `my§uper&P@§§word` becomes `my§uper&P@§§word`).
79
-
80
-
We strongly discourage entering your password into an online encoder utility, use Powershell instead. Here's one example:
Telerik Reporting provides options for installing the product by using [the Control Panel](#using-the-control-panel), by [the MSI installer file](#using-the-msi-file), or [NuGet](#installing-with-nuget). The NuGet packages add the Reporting assemblies to the project, but do not provide design time support.
14
+
Telerik Reporting provides options for installing the product by using [the Control Panel](#using-the-control-panel), by [the MSI installer file](#using-the-msi-file), or [NuGet](#using-nuget-packages). The NuGet packages add the Reporting assemblies to the project, but do not provide design time support.
15
15
16
16
>note After installing the product, you will need to [download and activate/update your Telerik Reporting License Key]({%slug license-key%}).
17
17
@@ -70,36 +70,56 @@ To install Telerik Reporting through the MSI automatic installer file:
70
70
71
71
## Using NuGet Packages
72
72
73
-
You can add Telerik Reporting to a project by using the [Telerik Reporting NuGet packages](https://nuget.telerik.com/v3/index.json). The NuGet packages are a single ZIP file with the `.nupkg` extension.
73
+
You can add Telerik Reporting to a project by installing NuGet packages hosted on the Telerik NuGet server: `https://nuget.telerik.com/v3/index.json`.
74
74
75
75
* The `.nupkg` file contains the libraries for .NET Core projects, the Reporting Engine, and the implementation of the [Reporting REST WebAPI-based service]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/asp.net-web-api-implementation/overview%}) where you can use the packages with the standard .NET 4.6.1 framework.
76
76
* The Telerik Reporting NuGet packages do not include design-time support.
77
-
* The legacy https://nuget.telerik.com/nuget server is now deprecated. Make sure to switch to the new https://nuget.telerik.com/v3/index.json server, which is faster, lighter, and reduces the number of requests from your NuGet client. For more information on how to add a NuGet feed, refer to the [official Microsoft documentation](https://www.visualstudio.com/en-us/docs/package/nuget/consume).
78
77
79
-
### Adding the Telerik NuGet Feed
78
+
Installing the Telerik Reporting NuGet packages involves three steps:
80
79
81
-
To install the Telerik Reporting NuGet packages, add the Telerik NuGet feed to Visual Studio and install the product. The following video demonstrates the steps for adding the Telerik NuGet feed to Visual Studio. If you prefer, however, you can follow the steps that are listed in writing after the video.
80
+
1.[Generating an API key required for the NuGet authentication](#step-1-generating-an-api-key).
81
+
1.[Adding the Telerik NuGet server to Visual Studio](#step-2-adding-the-telerik-nuget-package-source-to-visual-studio).
82
+
1.[Installing the Telerik Reporting NuGet packages](#step-3-installing-telerik-reporting).
To configure the Telerik NuGet Feed in Visual Studio:
86
+
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]({% slug using-nuget-keys %}#using-only-cli-commands) or the [`NuGet.Config` file]({% slug using-nuget-keys %}#using-a-nugetconfig-file-with-your-projects).
86
87
87
-
1. Open Visual Studio and go to **Tools** > **NuGet Package Manager** > **Package Manager Settings**.
88
-
1. Select **Package Sources** and then click the `+` button to add a new package source.
89
-
1. Enter a **Name** for the new package source, for example, **Telerik NuGet**.
90
-
1. Add the `https://nuget.telerik.com/v3/index.json` URL as a **Source**. Make sure the URL does not have a trailing slash. Click **OK**.
88
+
1. Go to the [API Keys](https://www.telerik.com/account/downloads/api-keys) page in your Telerik account.
89
+
1. Click **Generate New Key +**.
91
90
92
-
### Installing Telerik Reporting
91
+

92
+
93
+
1. In the **Key Note** field, add a note that describes the API key.
94
+
1. Click **Generate Key**.
95
+
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.
96
+
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.
97
+
98
+
>API keys expire after two years. Telerik will send you an email when a key is about to expire, but we recommend that you set your own calendar reminder with information about where you used that key: file paths, project links, AzDO and GitHub Action variable names, and so on.
99
+
100
+
### Step 2: Adding the Telerik NuGet Package Source to Visual Studio
101
+
102
+
To configure the Telerik NuGet feed in Visual Studio:
103
+
104
+
1. Open Visual Studio.
105
+
1. Go to **Tools > NuGet Package Manager > Package Manager Settings**.
106
+
1. Select **Package Sources**, and then click the + button.
107
+
1. In the **Source** field, enter `https://nuget.telerik.com/v3/index.json`. If you use a locally available NuGet package downloaded from <ahref="https://www.telerik.com/account/"target="_blank">your account</a>, add the path to the local package instead of the URL.
108
+
1. Click **Update** and then **OK**.
109
+
110
+
You have successfully added the Telerik NuGet feed as a Package source.
111
+
112
+
For more information on how to add a NuGet feed, refer to the [official Microsoft documentation](https://www.visualstudio.com/en-us/docs/package/nuget/consume).
113
+
114
+
### Step 3: Installing Telerik Reporting
93
115
94
116
After you have successfully added the Telerik NuGet feed as a package source, you need to authenticate your local NuGet instance and install Telerik Reporting:
95
117
96
118
1. Create a new Reporting project or open an existing one.
97
119
1. Go to **Tools** > **NuGet Package Manager** > **Manage NuGet Packages for Solution...**. Select the Telerik NuGet **Package source** from the drop-down list on the left.
98
-
1. Select the **Browse** tab to see the available packages. Enter your Telerik credentials in the Windows Authentication dialog.
99
-
100
-
> You may need to escape some [special characters in the password]({%slug telerikreporting/using-reports-in-applications/how-to-add-the-telerik-private-nuget-feed-to-visual-studio%}#handling-special-characters-in-password)
101
-
102
-
1. Select Telerik Reporting and click **Install**.
120
+
1. Select the **Browse** tab to see the available packages.
121
+
1. In the authentication window, enter `api-key` in the **User name** field and the [generated API key](#step-1-generating-an-api-key) in the **Password** field.
122
+
1. Select the desired Telerik Reporting NuGet package and click **Install**.
0 commit comments