0
votes

On Linux, I am not able to create new project in .NET core (via command line) neither install any nuget packages for other projects.

Following is the error pops up,

NuGet.targets(124,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. NuGet.targets(124,5): error : The SSL connection could not be established, see inner exception. NuGet.targets(124,5): error : The remote certificate is invalid according to the validation procedure.

I am able to access the URL in browser. However, I tried everything but nothing works. Most of the solutions are related to Windows environment. I am looking for a fix on Linux environment. I would really appreciate any help on this. Thanks.

1

1 Answers

0
votes

The problem was with openssl binaries. I have two versions of openssl installed on my machine. This 'nuget' uses one of the versions. The challenge was to figure out which version of openssl it uses. I was familiar with 'strace' (I have worked on low level) and grep with 'ssl' to find which version it is pointing. After that, I saw some symbolic links were missing. And since there were no 'root certificate' to verify 'api.nuget.org', this error was coming.