David
David

Reputation: 118

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.

Upvotes: 4

Views: 3348

Answers (1)

David
David

Reputation: 118

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.

Upvotes: 2

Related Questions