title: Nuget restore fails with authentication
body: <p>Migrating to my Linux machine for work I have run into a problem with Nuget. Our projects are .net core 3.1 and each has its own nuget.config file which has four package sources in it. The first is the obvious one  but the rest are specific for the company.</p>
  <p>Whenever I build I get an error stating that I am not authorised:</p>
  <p>/usr/share/dotnet/sdk/3.1.301/NuGet.targets(128,5): error : Unable to load the service index for source <a href="https://aldinternational.pkgs.visualstudio.com/_packaging/PLASMA/nuget/v3/index.json" rel="nofollow noreferrer">https://aldinternational.pkgs.visualstudio.com/_packaging/PLASMA/nuget/v3/index.json</a>. [/home/lg/Documents/ALD/repo/CampaignIngestion.OmegaConnector/OmegaConnector.Functions/OmegaConnector.Functions.csproj]
  /usr/share/dotnet/sdk/3.1.301/NuGet.targets(128,5): error :   Response status code does not indicate success: 401 (Unauthorized). [/home/lg/Documents/ALD/repo/CampaignIngestion.OmegaConnector/OmegaConnector.Functions/OmegaConnector.Functions.csproj]
  0 Warning(s)
  1 Error(s)</p>
  <p>but I can get the json output when I put that in a browser. I have run:</p>
  <p>mozroots --import --sync --url <a href="https://hg.mozilla.org/mozilla-central/raw-file/tip/security%E2%80%8C%E2%80%8B/nss/lib/ckfw/builti%E2%80%8C%E2%80%8Bns/certdata.txt" rel="nofollow noreferrer">https://hg.mozilla.org/mozilla-central/raw-file/tip/security‌​/nss/lib/ckfw/builti‌​ns/certdata.txt</a></p>
  <p>as the thread I found it on seemed to having a similar issue but for me no luck.</p>
  <pre><code>dotnet --info output
  
  .NET Core SDK (reflecting any global.json):
   Version:   3.1.301
   Commit:    7feb845744
  
  Runtime Environment:
   OS Name:     ubuntu
   OS Version:  18.04
   OS Platform: Linux
   RID:         ubuntu.18.04-x64
   Base Path:   /usr/share/dotnet/sdk/3.1.301/
  
  Host (useful for support):
    Version: 3.1.5
    Commit:  65cd789777
  
  .NET Core SDKs installed:
    2.1.302 [/usr/share/dotnet/sdk]
    2.2.300 [/usr/share/dotnet/sdk]
    3.1.301 [/usr/share/dotnet/sdk]
  
  .NET Core runtimes installed:
    Microsoft.AspNetCore.All 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.2.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.2.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
    Microsoft.NETCore.App 2.1.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.2.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  
  To install additional .NET Core runtimes or SDKs:
    https://aka.ms/dotnet-download
  </code></pre>
  <p>The build is definitely hitting the correct nuget.config and is not using my local use config. How can I fix this issue?</p>
  <p>I have all packages from key=&quot;nuget.org&quot; value=&quot;https://api.nuget.org/v3/index.json&quot; downloaded as it is the first in the list I think.</p>