wwwwe
wwwwe

Reputation: 145

.Net Nuget Package install rerturns ssl error

I am trying to use Newtonsoft.Json.Serialization namespace in my C# project. While I was searching on Google, I found out "dotnet package Newtonsoft.Json" is a way to install the package on ubuntu linux, but it returned below error:

writing /tmp/tmpC1RGW5.tmp
error:   The SSL connection could not be established, see inner exception.
error:   The remote certificate is invalid according to the validation procedure. 

.Net version is 3.1. Please help this C# newbie. Thanks.

Upvotes: 2

Views: 2500

Answers (1)

Athanasios Kataras
Athanasios Kataras

Reputation: 26450

There seems to be a problem with your machine certificates.

Check the github issue here

In my /etc/ssl/certs I notice some link to snakeoil certificate in red. so it seem these certificates are missing in my computer.

I recreate them and everything work again.

There are also links in more issues, some fixed and some others related to misconfiguration of ssl:

https://github.com/dotnet/corefx/issues/29942 https://github.com/dotnet/corefx/issues/30385 https://github.com/dotnet/corefx/issues/30388

This is not a net core issue nor a nuget issues it seems. It looks a lot more like a connectivity from your workstation issue, more than anything else.

Upvotes: 1

Related Questions