3

NOTE: This is .NET Core on Linux (Ubuntu)

I am setting up some CI infrastructure for .NET Core code and am running into a strange issue. Specifically, when it comes to package restore (dotnet restore).

The Jenkins instance that I am running is hosted on Azure via a Bitnami Jenkins image. In my build, I have a number of build steps. One of them (the one that actually triggers dotnet restore) is an Execute Shell.

When I run whoami from it, I get that I am the user tomcat. When dotnet restore is triggered from within the build step, however, I get the following error:

06:22:37 log  : Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/system.runtime.serialization.primitives/index.json'.
06:22:37 log  : An error occurred while sending the request.
06:22:37 log  :   Problem with the SSL CA cert (path? access rights?)

That same issue does not happen if I SSH into the box and do a sudo su - tomcat - running dotnet restore on the same folder from a SSH session works, while doesn't work in the Execute Shell step (despite the fact that both run in the same user context).

What am I missing that might be causing this?

Den
  • 16,686
  • 4
  • 47
  • 87
  • can nuget restore be tried instead? – Aravind Aug 03 '16 at 09:31
  • @Aravind why `nuget restore` instead of `dotnet restore`? – Den Aug 03 '16 at 14:52
  • both are going to restore the missing reference packages. Since that option did not work I thought you may try the nuget option. – Aravind Aug 03 '16 at 14:55
  • @Aravind don't think `nuget` is actually bundled as part of the SDK on Linux? – Den Aug 03 '16 at 16:21
  • oh okay. I did not realise that this dot net core running on linux.. – Aravind Aug 03 '16 at 16:43
  • Hi, Bitnami developer here, I'm sorry, but I'm not able to reproduce the issue. I just followed these steps: - Launch the Bitnami Jenkins image from the Azure launchpad. - Install `dotnet` and make an app using `dotnet new` - Build a new job with `dotnet restore` but the job finished without issues. Could you please provide us some steps in order to reproduce it? For sure I'm missing something. – Francisco Ortiz Aug 05 '16 at 14:01
  • @FranciscoOrtiz - try cloning the dotnet/core-docs repo from GitHub and then try `dotnet restore` on some of the projects there. I can share the script with you separately that I use to find all `global.json` and `project.json` files. – Den Aug 05 '16 at 17:03
  • 1
    @DenDelimarsky I'm experiencing a similar issue, did you find a solution to the error of dotnet on Linux? – fuzzi Apr 22 '18 at 13:03

0 Answers0