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
Adding nuget package to project successfully.
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.
.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
NuGet folks, can you take a first look at this issue?
@rohit21agrawal @rrelyea
@steveharter @janvorli is this a runtime failure? Are we missing some runtime component to be able to establish SSL connections?
@bartonjs any idea on the error:2006D080:BIO routines:BIO_new_file:no such file?
Issue https://github.com/dotnet/cli/issues/9391 seems to be the same issue as this one.
@omajid had this comment on dotnet/cli#9391:
@tanaka-takayoshi Hey, I assume you have the Red Hat corporate certificates installed on your system? Both @tmds and I ran into this because of those certificates, which can only be read by root. For a workaround (until the fix for dotnet/corefx#29942 lands):
sudo chmod +r /etc/pki/tls/certs/*
Closing this issue as this is not a CLI issue.
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?
Most helpful comment
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