question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuget package install fails. SSL connection could not be established

See original GitHub issue

Steps to reproduce

Install .Net SDK as it is instructed here. https://www.microsoft.com/net/learn/get-started/linux/ubuntu16-04

Create new mvc project dotnet new mvc

Add a nuget package, for example dotnet add package MySql.Data

Expected behavior

Adding nuget package to project successfully.

Actual behavior

Install fails with following error. Writing /tmp/tmp4Rr8UQ.tmp info : Adding PackageReference for package 'MySql.Data' into project '/home/alperenc/Desktop/sd/sd.csproj'. log : Restoring packages for /home/alperenc/Desktop/sd/sd.csproj... info : GET https://api.nuget.org/v3-flatcontainer/mysql.data/index.json log : Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/mysql.data/index.json'. log : The SSL connection could not be established, see inner exception. log : error:2006D080:BIO routines:BIO_new_file:no such file info : GET https://api.nuget.org/v3-flatcontainer/mysql.data/index.json log : Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/mysql.data/index.json'. log : The SSL connection could not be established, see inner exception. log : error:2006D080:BIO routines:BIO_new_file:no such file info : GET https://api.nuget.org/v3-flatcontainer/mysql.data/index.json error: Failed to retrieve information about 'MySql.Data' from remote source 'https://api.nuget.org/v3-flatcontainer/mysql.data/index.json'. error: The SSL connection could not be established, see inner exception. error: error:2006D080:BIO routines:BIO_new_file:no such file

But i can browse https links specified in the log without issues in browser. Tried with different internet connections. Happens on both of my mint linux x64 pcs.

Environment data

.NET Core SDK (reflecting any global.json): Version: 2.1.300 Commit: adab45bf0c

Runtime Environment: OS Name: linuxmint OS Version: 18.3 OS Platform: Linux RID: linuxmint.18.3-x64 Base Path: /usr/share/dotnet/sdk/2.1.300/

Host (useful for support): Version: 2.1.0 Commit: caa7b7e2ba

.NET Core SDKs installed: 2.1.300 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App] https://github.com/dotnet/cli/issues

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
alperencaliskancommented, Jun 1, 2018

Thank you for giving link to dotnet/cli#9391. My problem was some broken symlinks to certificates in /etc/ssl/certs. Removing them solved the issue. But a lot of hosts will have this issue, dotnet shouldn’t throw error but skip them.

Related corefx issue https://github.com/dotnet/corefx/issues/29942

0reactions
brunofvallicommented, Sep 9, 2020

I am using Red Hat with Corporate Certificates and the fix of sudo chmod +r /etc/pki/tls/certs/* did not fix. Is there a way to either ignore SSL or point NuGet to the directory where the certs are?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] Nuget error: SSL connection could not be ...
Anyway, I found a solution but first the problem. The problem is that dotnet is looking for the certificates at the wrong location...
Read more >
SSL connection could not be established for nuget restore ...
We have the same problem with our local NuGet server. The server uses a self-signed certificate and we cannot restore NuGet packages from...
Read more >
c# - .Net Nuget Package install rerturns ssl error
writing /tmp/tmpC1RGW5.tmp error: The SSL connection could not be established, see inner exception. error: The remote certificate is invalid ...
Read more >
Unable To Install Nuget Packages SSL connection could ...
Unable to install any nuget package in visual studio for mac. i get the follwing error. Visual Studio for Macnugetvisual studio for mac....
Read more >
The SSL connection could not be established, see inner ...
Hi team, so im creating this app using Foursquare's Places API, everything seems good, but im not able to get the values from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found