6

I'm using a build server to run dotnet publish on my .NET project to package the project and the dependencies.

When I run dotnet publish using

<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />

in my .csproj file, the application runs dotnet publish as expected. However, when I make the change to increment the AspNetCore version to Version="2.0.7" it results in a:

/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. 
[/{file-path}/dotnetproj.csproj]
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error :   An error occurred while sending the request. 
[/{file-path}/dotnetproj.csproj]
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error :   Problem with the SSL CA cert (path? access rights?) 
[/{file-path}/dotnetproj.csproj]

(This is an example, if I make any modifications to the packages listed in the .csproj file, e.g. add a new package, it results in the same errors.) . I'm running this command through Jenkins.

Is there a way for me to correctly run the incremented version? Does it involve updating / recreating certificates for the build server? The server is running ubuntu.

Any help on this issue will be greatly appreciated!

fuzzi
  • 1,967
  • 9
  • 46
  • 90
  • Thank you @TarunLalwani for pointing that out - that was a typo. I've updated the question. – fuzzi Apr 20 '18 at 16:53
  • Instead of changing it this way, can you do a `dotnet remove ...` and then `dotnet add package Microsoft.AspNetCore.All --version 2.0.7`. Manual modification may not be the right way to doing it – Tarun Lalwani Apr 20 '18 at 17:01
  • Okay, I'll take a look at the modules installed on the Jenkins .NET. I'll deleting the workspace before each build, but this probably isn't removing the installed packages? – fuzzi Apr 20 '18 at 18:50
  • @TarunLalwani I did a remove of the package, and an add of the package to be added from the command line. But I still got the same errors appearing. – fuzzi Apr 20 '18 at 20:46

1 Answers1

0

That seems similar to "Jenkins CI - SSL CA error" and its associated dotnet/cli issue 3987 (without any answer)

Check your Jenkins agent (I assume Linux one): see:

Both depends on OS where the Jenkins agent is running.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250