Dotnet core 3.0 build fails

Hi there,
I’ve have a dotnet core 3 project that fails when building. Seems like dotnet restore times out.

*********************** Project structure **********

Project structure is like in the image:

*********************** Build script ****************

My build script: .gitlab-ci.yml
image :


  • build
  • test

stage: build
- dotnet build --verbosity n
- docker
- dotnet

stage: test
- dotnet test --verbosity n
- docker
- dotnet

*********************** Error ***********************

Running with gitlab-runner 10.2.0 (0a75cdd1)
on tdchici01.gkl.10ni.net_dotnet (6e39Z-ey)
Using Docker executor with image
Using docker image sha256:9ec6aee1564e112cd56992df1ea66278e1c0cff6aa97d73f8ed3ec7aff0b6dd7 for predefined container…
Using locally found image version due to if-not-present pull policy
Using docker image ID=sha256:170a7f2ec51a5cd1f6e68a3142ebb78f92949543f4d62f3851b97a0d124c606c for build container…
Running on runner-6e39Z-ey-project-678-concurrent-0 via
Fetching changes…
HEAD is now at ff30ff3 Build work
ff30ff3…874208a master -> origin/master
Checking out 874208a6 as master…
Skipping Git submodules setup
$ dotnet build --verbosity n
Microsoft ® Build Engine version 16.3.0+0f4c62fea for .NET Core
Copyright © Microsoft Corporation. All rights reserved.

Build started 11/20/2019 16:32:26.
1>Project “/builds/atlas/atlas.alive/Atlas.Alive.sln” on node 1 (Restore target(s)).
Building solution configuration “Debug|Any CPU”.
Restoring packages for /builds/atlas/atlas.alive/Atlas.Alive/Atlas.Alive.csproj…
Restoring packages for /builds/atlas/atlas.alive/Atlas.Alive.Test/Atlas.Alive.Test.csproj…
Restoring packages for /builds/atlas/atlas.alive/Atlas.StaticProject.Test/Atlas.StaticProject.Test.csproj…
Committing restore…
Generating MSBuild file /builds/atlas/atlas.alive/Atlas.Alive/obj/Atlas.Alive.csproj.nuget.g.props.
Generating MSBuild file /builds/atlas/atlas.alive/Atlas.Alive/obj/Atlas.Alive.csproj.nuget.g.targets.
Writing assets file to disk. Path: /builds/atlas/atlas.alive/Atlas.Alive/obj/project.assets.json
Restore completed in 151.93 ms for /builds/atlas/atlas.alive/Atlas.Alive/Atlas.Alive.csproj.
1>/usr/share/dotnet/sdk/3.0.100/NuGet.targets(123,5): error : Unable to load the service index for source [/builds/atlas/atlas.alive/Atlas.Alive.sln]
/usr/share/dotnet/sdk/3.0.100/NuGet.targets(123,5): error : The HTTP request to ‘GET’ has timed out after 100000ms. [/builds/atlas/atlas.alive/Atlas.Alive.sln]
1>Done Building Project “/builds/atlas/atlas.alive/Atlas.Alive.sln” (Restore target(s)) – FAILED.


   "/builds/atlas/atlas.alive/Atlas.Alive.sln" (Restore target) (1) ->
   (Restore target) -> 
     /usr/share/dotnet/sdk/3.0.100/NuGet.targets(123,5): error : Unable to load the service index for source [/builds/atlas/atlas.alive/Atlas.Alive.sln]
   /usr/share/dotnet/sdk/3.0.100/NuGet.targets(123,5): error :   The HTTP request to 'GET' has timed out after 100000ms. [/builds/atlas/atlas.alive/Atlas.Alive.sln]

0 Warning(s)
1 Error(s)

Time Elapsed 00:05:02.18
ERROR: Job failed: exit code 1

*********************** Added information ********
If I in the build stage got to the project folder “cd Atlas.Alive” then the build succeeds but the test fails with the same error as above.