Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deployment/ci-cd-build-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Often enough, you would want to set up Continuous Integration and/or Continuous

There are a couple of common ways people implement CI/CD automated builds.

* You can [restore the Telerik NuGet packages]({%slug installation/nuget-keys%}) by downloading them from the Telerik NuGet server. You can achieve this by using the more secure token-based authentication with the Telerik NuGet server. If you prefer the basic authentication with a username and password, you can use your own credentials (or the credentials of the license holder, depending on how your licenses are set up) in the `NuGet.Config` of the build machine/pipeline. In this case, make sure that your credentials are encrypted when you add the Telerik feed source through the CLI. Alternatively, you can copy an encrypted version from your own local config if you have one and if plain text is an issue. See more on setting up the [Telerik NuGet package source]({%slug installation/nuget%}).
* You can [restore the Telerik NuGet packages]({%slug deployment-nuget%}) by downloading them from the Telerik NuGet server. You can achieve this by using the more secure token-based authentication with the Telerik NuGet server. If you prefer the basic authentication with a username and password, you can use your own credentials (or the credentials of the license holder, depending on how your licenses are set up) in the `NuGet.Config` of the build machine/pipeline. In this case, make sure that your credentials are encrypted when you add the Telerik feed source through the CLI. Alternatively, you can copy an encrypted version from your own local config if you have one and if plain text is an issue. See more on setting up the [Telerik NuGet package source]({%slug installation/nuget%}).

* Creating a local folder (for example, on a shared network drive or other suitable location accessible only by your builds and team) that holds the `.nupkg` files we provide (you can download them from your telerik.com account, or from your local installation - both [automated]({%slug installation/msi%}) and from the [zip archive]({%slug installation/zip%})).

Expand Down Expand Up @@ -109,7 +109,7 @@ When building or restoring Blazor apps in Docker, the crucial steps are:

1. Have a `NuGet.Config` file in the project or solution folder. The file can [define the Telerik NuGet feed]({%slug installation/nuget%}#edit-the-nugetconfig-file), but without the credentials (Telerik account or NuGet API key).
1. Copy the `NuGet.Config` file together with the `.csproj` file(s) to the Docker image.
1. [Add](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-add-source) or [update](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-update-source) the Telerik NuGet feed with the [stored Telerik NuGet credentials (secrets)]({%slug installation/nuget-keys%}). When specifying the `NuGet.Config` file location, note that file names are case-sensitive on Unix systems.
1. [Add](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-add-source) or [update](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-update-source) the Telerik NuGet feed with the [stored Telerik NuGet credentials (secrets)]({%slug deployment-nuget%}). When specifying the `NuGet.Config` file location, note that file names are case-sensitive on Unix systems.
1. Restore or build the Blazor app.

The following code is the build portion of a sample `Dockerfile` that builds a .NET 8 Blazor Web App with two projects. The `dotnet restore` command is executed from the `src` folder of the Docker image (where the `NuGet.Config` is copied), so that the `NuGet.Config` file can be used to restore all projects in the solution.
Expand Down
2 changes: 1 addition & 1 deletion deployment/nuget-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Restoring NuGet Packages in CI
page_title: Restoring NuGet Packages in CI
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.
slug: installation/nuget-keys
slug: deployment-nuget
position: 10
---

Expand Down
4 changes: 2 additions & 2 deletions installation/nuget.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ To edit a `NuGet.Config` file and add the Telerik feed, you need to:
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-nugetconfig-file):

* Use your Telerik account email as the username, and your Telerik password.
* Use `api-key` as the username and your personal [NuGet API Key]({%slug installation/nuget-keys%}) as the password.
* Use `api-key` as the username and your personal [NuGet API Key]({%slug deployment-nuget%}) as the password.

You can [generate your Telerik NuGet API Key on telerik.com](https://www.telerik.com/account/downloads/nuget-keys). Read more about [using NuGet API Keys in different environments]({%slug installation/nuget-keys%}).
You can [generate your Telerik NuGet API Key on telerik.com](https://www.telerik.com/account/downloads/nuget-keys). Read more about [using NuGet API Keys in different environments]({%slug deployment-nuget%}).

> Always use the NuGet API Key in plain text.

Expand Down
22 changes: 20 additions & 2 deletions troubleshooting/nuget-feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ The most common reasons for issues with the private Telerik NuGet feed are relat

Errors like `Unable to load the service index for source https://nuget.telerik.com/v3/index.json` don't indicate the exact cause of the problem. In such cases, check the additional error information which usually provides an error code.

To verify if you can access the Telerik NuGet server and the expected packages, open the https://nuget.telerik.com/v3/search?q=blazor&prerelease=true&skip=0&take=100&semVerLevel=2.0.0 URL directly in the web browser and enter your Telerik credentials in the prompt.
### Verify NuGet Credentials and Package Access

To verify if you can access the Telerik NuGet server and the expected packages, open https://nuget.telerik.com/v3/search?q=blazor&prerelease=true&skip=0&take=100&semVerLevel=2.0.0 directly in the web browser and enter your Telerik credentials in the prompt.

As a result, you will see a JSON output with the NuGet packages and versions that are available for you. Depending on your license, search for `Telerik.UI.for.Blazor` or `Telerik.UI.for.Blazor.Trial`.

Expand All @@ -60,7 +62,23 @@ If you suspect that your saved credentials are wrong, use the following steps to

## Error 401 Unauthorized

If your credentials are correct and your license includes the requested product and version, then the password probably contains special characters. You need to escape these characters or the authentication can fail on the NuGet server. For example, a common character you must escape is the ampersand (`&`); however, the character causing the issue may be as unique as the section character (`§`).
`Error 401 Unauthorized` means that the Telerik NuGet server received invalid credentials. There may be different reasons for that:

* No provided credentials
* Incorrect password
* [Correct password with unescaped special characters](#special-characters-in-the-password)
* Using an invalidated (removed) [Telerik NuGet API key]({%slug installation/nuget%}#use-nuget-api-key), which no longer exists in <a href="https://www.telerik.com/account/downloads/nuget-keys" target="_blank">your Telerik account</a>.
* Using a valid Telerik NuGet API key with the wrong username. It must be `api-key`.

An easy way to verify your credentials is to [access the Telerik NuGet server directly in the web browser](#tips-for-handling-common-nuget-issues). Then, depending on your setup, check or update your credentials in:

* The applicable `NuGet.Config` file. There may be <a href="https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior" target="_blank">multiple such files on the device</a>.
* [Windows Credential Manager](#removing-saved-credentials)
* In a [CI/CD workflow]({%slug deployment-nuget%}#using-net-cli-commands), which [obtains the credentials from a secret]({%slug deployment-nuget%}#storing-nuget-keys).

### Special Characters in the Password

[If your credentials are correct and your license includes the requested product and version](#verify-nuget-credentials-and-package-access), then the password probably contains special characters. You need to escape these characters or the authentication can fail on the NuGet server. For example, a common character you must escape is the ampersand (`&`); however, the character causing the issue may be as unique as the section character (`§`).

To solve the issue:

Expand Down
Loading