Fix pipeline NuGet restore failure under network isolation policy#682
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
The main CI pipeline restored NuGet packages using the public-facing NuGet.config, which resolves to api.nuget.org - an endpoint blocked under this pipeline's network isolation policy. NuGet.config must remain the public-facing default for external OSS contributors, so this repo already has a NuGet.Internal.config pointing at an internal Azure Artifacts upstream feed (used by azure-pipelines.release.yml). - Point the CI Restore task's nugetConfigPath at NuGet.Internal.config instead of the public NuGet.config. - Add NuGetAuthenticate@1 before restore so the build service can authenticate to the internal feed. - Append CFSClean to the pipeline's networkIsolationPolicy (kept alongside the existing Permissive setting rather than replacing it).
…tion The original fix pointed at a cross-organization feed, which NuGetAuthenticate@1 cannot authenticate against since it only covers feeds within the same org/collection as the pipeline. This caused NU1301 401 Unauthorized failures in CI. Created a new same-org feed 'WinGetCreateDependencies' in the winget-create project (matching the sibling repo convention used by winget-cli/winget-dsc), configured with nuget.org as an upstream source, and granted read access to the project's Build Service identity. Repointed NuGet.Internal.config at this feed.
AmelBawa-msft
force-pushed
the
sfi/ES4.2.4/7dcb92b3
branch
from
July 23, 2026 21:28
0544a2f to
e5a57d0
Compare
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Madhusudhan-MSFT
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NuGet.configstays public-facing so external OSS contributors can restore/build locally. The pipeline now usesNuGet.Internal.config(an internal-feed-only config, already used by the release pipeline) for its own restore step instead, authenticating viaNuGetAuthenticate@1against a same-org Azure Artifacts feed.