Hi,
I try to use Telerik.UI.for.Blazor in Docker.
I have added a nuget.config file and also add the corresponding line as explained here
https://docs.telerik.com/aspnet-core/knowledge-base/docker-build-nuget
But when running the docker build command there is this error
"error NU1301: Unable to load the service index for source https://nuget.telerik.com/v3/index.json."
What is wrong ?
Best regards.
You have to copy the nuget.config before trying to restore.
So you need to add this command in the dockerfile
COPY "nuget.config" .
Here is my dockerfile
It seems that using nuget keys don't work
Dockerfile :
nuget.config file :
<?xml version="1.0" encoding="utf-8"?> <configuration> <!-- Use the Telerik NuGet server as a package source --> <packageSources> <clear/> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="telerikserver" value="https://nuget.telerik.com/v3/index.json" protocolVersion="3"/> </packageSources> <!-- Your Telerik account credentials or Telerik NuGet Key --> <packageSourceCredentials> <telerikserver> <add key="Username" value="mykeyname" /> <add key="ClearTextPassword" value="mykey" /> </telerikserver> </packageSourceCredentials> <!-- ...other config settings, see reference links at bottom of article --> </configuration>
The error message when building the docker image is :
Any suggestions for using nuget keys ?
Best regards
Hello Michel,
There are various potential causes for this error such as failing authentication, requesting the incorrect type of packages based on the license type, missing (or wrong) local configuration, or network connectivity issues.
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.
As a result, you will see a JSON output with the NuGet packages and versions that are available for you.
If you can access the feed in the browser, but do not see the packages in Visual Studio, most likely the problem is caused by entering wrong credentials or using a different Telerik account. Make sure your saved credentials are correct. Also, you must not have a NuGet.Config file in your project as it may bring in invalid credentials and project-level configuration files override the global ones.
I hope this helps. Please let me know if you are still experiencing an issue after completing the above steps.