Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set up GitLab runner to pull from a private NuGet repo on build of my project?

How do I set up GitLab runner to pull from a private NuGet repo on build of my project? For example I have a project using a package from Telerik. When I created the yaml file and tell the CI to build it fails with error unable to find package Telerik.UI.for.Blazor. No packages exist with this id in source(s): nuget.org. I also have a private repo on one of our company servers that I would need to pull packages from.

like image 630
David Avatar asked Sep 15 '25 16:09

David


1 Answers

I have found a solution to this, not sure it is the best solution. I added a NuGet.config file with the package source and credentials as suggested in these links.

https://docs.telerik.com/aspnet-core/getting-started/first-steps-cli

https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file#example-config-file

The project now pulls the dll from Telerik and builds. Only problem is my Telerik creds are now in GitLab.

like image 102
David Avatar answered Sep 18 '25 10:09

David