Yaml Build Task - DotNetCoreCLI@2 Restore working differently when using Proxy & No Proxy
See original GitHub issueIssue moved from dotnet/sdk#12121
- Please respond to @temelj.
From @temelj on Monday, June 22, 2020 9:33:04 AM
Hi,
I have a step in my azure pipelines that does the following
- task: DotNetCoreCLI@2
displayName: 'Restore Packages'
inputs:
command: 'restore'
projects: '**/*.csproj'
feedsToUse: 'select'
vstsFeed: '00000a00-ef00-0e00-0fb0-000bf0bda000'
includeNuGetOrg: false
The following logs are from a machine that has NO Proxy configured:
##[debug]Setting up auth
##[debug]SYSTEMVSSCONNECTION=https://dev.azure.com/REMOVED/
##[debug]Discovered URL prefixes: https://dev.azure.com/REMOVED/,https://REMOVED.pkgs.visualstudio.com/,https://pkgsprodcus1.pkgs.visualstudio.com/,https://REMOVED.pkgs.visualstudio.com/,https://REMOVED.pkgs.visualstudio.com/,https://pkgs.dev.azure.com/REMOVED/
##[debug]DotNetCoreCLITask.ExtraUrlPrefixesForTesting=undefined
##[debug]Getting credentials for local feeds
SYSTEMVSSCONNECTION exists true
##[debug]SYSTEMVSSCONNECTION exists true
##[debug]Got auth token
##[debug]externalEndpoints=null
##[debug]Setting up sources
##[debug]selectOrConfig=select
##[debug]Agent.BuildDirectory=D:\TEMELJ_v1\_work\1
##[debug]build.buildId=15518
##[debug]feedRestore=00000a00-ef00-0e00-0fb0-000bf0bda000
##[debug]NuGet.OverwritePackagingCollectionUrl=undefined
##[debug]Getting registry url from https://REMOVED.pkgs.visualstudio.com/
##[debug]Agent.ProxyUrl=undefined
##[debug]Created webApi client for https://REMOVED.pkgs.visualstudio.com/; options: {"proxy":null,"allowRetries":true,"maxRetries":5,"ignoreSslError":false}
##[debug]Feed registry url: https://REMOVED.pkgs.visualstudio.com/_packaging/00000a00-ef00-0e00-0fb0-000bf0bda000/nuget/v3/index.json
##[debug]includeNuGetOrg=false
##[debug]Adding the following sources to the config file: 00000a00-ef00-0e00-0fb0-000bf0bda000
##[debug]Adding sources to nuget.config
##[debug]Saving NuGet.config to a temporary config file.
Then the following when a proxy is configured:
##[debug]Setting up auth
##[debug]SYSTEMVSSCONNECTION=https://dev.azure.com/REMOVED/
##[debug]Discovered URL prefixes: https://dev.azure.com/REMOVED/
##[debug]DotNetCoreCLITask.ExtraUrlPrefixesForTesting=undefined
##[debug]Getting credentials for local feeds
SYSTEMVSSCONNECTION exists true
##[debug]SYSTEMVSSCONNECTION exists true
##[debug]Got auth token
##[debug]externalEndpoints=null
##[debug]Setting up sources
##[debug]selectOrConfig=select
##[debug]Agent.BuildDirectory=D:\TEMELJ_v1\_work\1
##[debug]build.buildId=15522
##[debug]feedRestore=00000a00-ef00-0e00-0fb0-000bf0bda000
##[debug]NuGet.OverwritePackagingCollectionUrl=undefined
##[debug]Getting registry url from https://dev.azure.com/REMOVED/
##[debug]Agent.ProxyUrl=http://127.0.0.1:3128
##[debug]Agent.ProxyUsername=undefined
##[debug]Agent.ProxyPassword=undefined
##[debug]Agent.ProxyBypassList=undefined
##[debug]Created webApi client for https://dev.azure.com/REMOVED/; options: {"proxy":{"proxyUrl":"http://127.0.0.1:3128","proxyBypassHosts":[]},"allowRetries":true,"maxRetries":5,"ignoreSslError":false}
##[debug]Network call failed. Number of retries left: 2
##[warning]Failed to find api location for area: nuget id: 9D3A4E8E-2F8F-4AE1-ABC2-B461A51CB3B3
##[debug]Processed: ##vso[task.issue type=warning;]Failed to find api location for area: nuget id: 9D3A4E8E-2F8F-4AE1-ABC2-B461A51CB3B3
##[debug]Error: Failed to find api location for area: nuget id: 9D3A4E8E-2F8F-4AE1-ABC2-B461A51CB3B3
at beginGetLocation.then (D:\TEMELJ_v1\_work\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.171.3\node_modules\azure-devops-node-api\VsoClient.js:85:23)
at process._tickCallback (internal/process/next_tick.js:109:7)
Based on the logs, I cannot identify whether the Proxy is blocking something but one difference I’ve observed is with the following:
NO PROXY:
##[debug]Discovered URL prefixes: https://dev.azure.com/REMOVED/,https://REMOVED.pkgs.visualstudio.com/,https://pkgsprodcus1.pkgs.visualstudio.com/,https://REMOVED.pkgs.visualstudio.com/,https://REMOVED.pkgs.visualstudio.com/,https://pkgs.dev.azure.com/REMOVED/
WITH PROXY:##[debug]Discovered URL prefixes: https://dev.azure.com/REMOVED/
Why would that be the case?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Issue moved from dotnet/sdk#12121
From @temelj on Tuesday, June 23, 2020 7:55:02 AM
Findings: api.nuget.org is blocked by the proxy I am attempting to purely use the private feed (to which I know that I have connectivity to).
And it is failing so far. I am starting to believe that the tooling relies on api.nuget.org to be accessible regardless of the fact that one uses a private feed additionally. I am waiting for api.nuget.org to be unblocked through the proxy - if it works then, my theory is correct, if it doesn’t, back at square one.
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days