I have .NET5.0 application which I'm trying to set up on Ubuntu20.04 under WLS2.
When I run dotnet restore command, nuget gives me the following error for all the packages.
Determining projects to restore...
Retrying 'FindPackagesByIdAsyncCore' for source 'http://coporate_url/nuget/FindPackagesById()?id='Microsoft.AspNetCore.Authentication.AzureAD.UI'&semVerLevel=2.0.0'.
Response status code does not indicate success: 503 (Hostname not found or DNS failed).
It looks like a DNS problem, however the command works fine when I run it on dotnet-sdk-3.1. It also works okay when I run it directly on Windows.
I use a VPN to connect to private corporate network, and Nuget.Config is as follows.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="company" value="http://corporate_url/nuget" />
</packageSources>
<config>
<add key="http_proxy" value="http://corporate_proxy_ip" />
<add key="no_proxy" value="corporate_url" />
</config>
</configuration>
When I set the resolved company ip address to value property for company package resources, nuget successfully retrieve corporate private packages, but public ones still fail.
Is there anybody having similar problem?
Expected behavior
dotnet restore should not fail restoring
Actual behaivior
Determining projects to restore...
Retrying 'FindPackagesByIdAsyncCore' for source 'http://coporate_url/nuget/FindPackagesById()?id='Microsoft.AspNetCore.Authentication.AzureAD.UI'&semVerLevel=2.0.0'.
Response status code does not indicate success: 503 (Hostname not found or DNS failed).
Environment data
dotnet --info output
.NET SDK (reflecting any global.json):
Version: 5.0.300
Commit: 2e0c8c940e
Runtime Environment:
OS Name: ubuntu
OS Version: 20.04
OS Platform: Linux
RID: ubuntu.20.04-x64
Base Path: /usr/share/dotnet/sdk/5.0.300/
Host (useful for support):
Version: 5.0.6
Commit: 478b2f8c0e
.NET SDKs installed:
3.1.409 [/usr/share/dotnet/sdk]
5.0.300 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]