Skip to content

Fix invalid <clear /> element in nuget.config example - #45908

Merged
mchammer01 merged 2 commits into
github:mainfrom
SurefireStudios:fix-nuget-clear-element
Sep 17, 2026
Merged

mchammer01 merged 2 commits into
github:mainfrom
SurefireStudios:fix-nuget-clear-element

Conversation

@SurefireStudios

@SurefireStudios SurefireStudios commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Why:

Closes:

Remove access to public registries writes the NuGet clear element as < clear />, and XML element names cannot begin with whitespace.

So the example does not parse, and NuGet rejects the nuget.config the article is telling readers to write.

The correct <clear /> is already used twice in Working with the NuGet registry, and < clear /> appears nowhere else in content/.

What's being changed (if available, include any code snippets, screenshots, or gifs):

Removed the stray space in all three occurrences — the xml block plus the two prose mentions, which are wrong the same way.

The block now parses:

root = configuration
  child: clear {}
  child: add {'key': 'example-nuget', 'value': 'https://private_registry_url/nuget/example-nuget/index.json'}

Same article as #45907 but non-overlapping lines, so either can merge first.

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

The NuGet section wrote the element as `< clear />` with a space between
the angle bracket and the tag name, in the XML example and twice in the
surrounding prose. XML element names cannot begin with whitespace, so the
example does not parse and NuGet rejects the resulting nuget.config.

The correct spelling `<clear />` is already used in
"Working with the NuGet registry".
Copilot AI balanced review requested due to automatic review settings September 15, 2026 15:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/remove-access-to-public-registries.md fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18 3.17
fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18 3.17

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Sep 15, 2026
@janiceilene janiceilene added builder persona and removed triage Do not begin working on this issue until triaged by the team labels Sep 16, 2026
@janiceilene

Copy link
Copy Markdown
Contributor

👋 @SurefireStudios thanks for the PR! I'll get this triaged for review.

@mchammer01 mchammer01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! 🎯
I appreciate that you tracked down all three occurrences.
Thanks for contributing! LGTM ✅

@mchammer01
mchammer01 added this pull request to the merge queue Sep 17, 2026
Merged via the queue into github:main with commit 05ff99a Sep 17, 2026
43 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants