Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

"Unable to connect to remote server" error when restoring NuGet packages in GitLab CI Pipeline

$
0
0

I have a .NET project that I am building a pipeline for in GitLab CI to build and test merge requests.

In my .gitlab-ci.yml file, I have a script under my restore job that simply restores the NuGet packages using the command:

C:\tools\NuGet\nuget.exe restore

When testing this locally, by navigating into the cloned folder that the pipeline creates on my machine, then executing the command with the command prompt, the restoration succeeds with no errors. However, when I run this command on GitLab while in that same location, I get the sequence of errors for NuGet packages:

An error occurred while sending the request.
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond (ip addresss)
Retrying 'FindPackagesByIdAsyncCore' for source 'https://nexus.macrix.eu/repository/pct2022/FindPackagesById()?id='Microsoft.NET.Test.Sdk'&semVerLevel=2.0.0'.

I assume this is because the packages that failed to retrieve are ones that are not found online.

The NuGet packages my project use are simply referenced through my local C drive via C:\Users\myuser\.nuget\packages, and other than being included in my config file, there are no other references to the packages.

What is a solution to this issue?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>