Running dotnet restore for command line in a proxy server (corporate network)
Run dotnet restore and see what info you're getting.
If you're getting 407 (Proxy access denied)
nuget config -set http_proxy="http://proxysslbypass"
nuget config -set http_proxy.user="ourUserName"
nuget config -set http_proxy.password="Your secret password."
If you're getting 401 then
Download nuget.exe (https://dist.nuget.org/win-x86-commandline/latest/nuget.exe)
Then run the following command line, please make sure you replace the package url name and PAT Token info which you got from Azure DevOps.
nuget.exe sources Add -Name "Nuget_Artifact" -Source "https://pkgs.dev.azure.com/somecompany_packaging/division/nuget/v3/index.json" -username MY_USERNAME -password MY_PAT_TOKEN
Comments