Nuget package install fails. SSL connection could not be established
See original GitHub issueSteps 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:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
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
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?