Skip to content

Conversation

@Nigusu-Allehu
Copy link
Member

Fixes: NuGet/Home#14418
Updated the documentation for NuGet Error NU1302 to include additional scenarios and solutions for handling HTTP sources.

Updated the documentation for NuGet Error NU1302 to include additional scenarios and solutions for handling HTTP sources.
@Copilot Copilot AI review requested due to automatic review settings September 23, 2025 19:55
@Nigusu-Allehu Nigusu-Allehu requested review from a team as code owners September 23, 2025 19:55
@Nigusu-Allehu Nigusu-Allehu self-assigned this Sep 23, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the NU1302 error documentation to include a new scenario where HTTPS package sources contain HTTP resource endpoints, providing comprehensive guidance for both the original HTTP source scenario and the new mixed HTTPS/HTTP resource scenario.

  • Added Scenario 2 documentation for HTTPS sources with HTTP resources
  • Provided clear solutions including updating sources to HTTPS and allowing insecure connections
  • Maintained consistent structure and formatting with the existing documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@learn-build-service-prod
Copy link

Learn Build status updates of commit 17d9565:

💡 Validation status: suggestions

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1302.md 💡Suggestion View Details

docs/reference/errors-and-warnings/NU1302.md

  • Line 69, Column 74: [Suggestion: learn-site-link-broken - See documentation] Link '/api/overview' points to a learn site page that doesn't exist. Check the path or URL and update the link.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link

Learn Build status updates of commit 062c2df:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1302.md ⚠️Warning View Details

docs/reference/errors-and-warnings/NU1302.md

  • Line 69, Column 74: [Warning: file-not-found - See documentation] Invalid file link: '../../api/overview'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link

Learn Build status updates of commit c8f548d:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1302.md ⚠️Warning View Details

docs/reference/errors-and-warnings/NU1302.md

  • Line 69, Column 74: [Warning: file-not-found - See documentation] Invalid file link: '../../api/overview'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@learn-build-service-prod
Copy link

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link

Learn Build status updates of commit 68768f5:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1302.md ⚠️Warning View Details

docs/reference/errors-and-warnings/NU1302.md

  • Line 69, Column 78: [Warning: file-not-found - See documentation] Invalid file link: '../../api/overview'.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

## Scenario 2

> You are using a NuGet source 'https://contoso/v3/index.json' that contains an 'HTTP' service index resource endpoint: 'http://contoso/v3-flatcontainer/contoso/index.json'. This is insecure and not recommended. To allow HTTP resources, you must explicitly set 'allowInsecureConnections' to true in your NuGet.Config file. For more information, visit https://aka.ms/nuget-https-everywhere.
Copy link
Contributor

Choose a reason for hiding this comment

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

I know I've left this feedback on another doc as well, but would it make sense to delete the self-referencing URL from the docs page? Same applies to Scenario 1

Suggested change
> You are using a NuGet source 'https://contoso/v3/index.json' that contains an 'HTTP' service index resource endpoint: 'http://contoso/v3-flatcontainer/contoso/index.json'. This is insecure and not recommended. To allow HTTP resources, you must explicitly set 'allowInsecureConnections' to true in your NuGet.Config file. For more information, visit https://aka.ms/nuget-https-everywhere.
> You are using a NuGet source 'https://contoso/v3/index.json' that contains an 'HTTP' service index resource endpoint: 'http://contoso/v3-flatcontainer/contoso/index.json'. This is insecure and not recommended. To allow HTTP resources, you must explicitly set 'allowInsecureConnections' to true in your NuGet.Config file.


#### Option 2: Allow Insecure Connections (If Necessary)

If you must use the source, explicitly allow insecure connections by adding the `allowInsecureConnections` flag in the `NuGet.Config`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we call out the VS Options support for enabling this flag as well?

Copy link
Contributor

@donnie-msft donnie-msft Oct 14, 2025

Choose a reason for hiding this comment

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

Suggested change
If you must use the source, explicitly allow insecure connections by adding the `allowInsecureConnections` flag in the `NuGet.Config`:
If you must use the source, explicitly allow insecure connections by adding the `allowInsecureConnections` flag in the `NuGet.Config`:
For information about managing the setting in Visual Studio, see [NuGet Options in Visual Studio](../../consume-packages/nuget-visual-studio-options.md#allow-insecure-connections)

### Issue

The package source you configured is **HTTPS**, but one of its resources (indicated in the error message) is **HTTP**.
Copy link
Contributor

Choose a reason for hiding this comment

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

The language is slightly strong here with so many "you"s. It may be configured by a machine-wide config, or on CI, etc.
Can we emphasize the configuration (NuGet.Config) is setup a particular way?

Suggested change
The package source you configured is **HTTPS**, but one of its resources (indicated in the error message) is **HTTP**.
A configured package source uses **HTTPS**, but one of its resources (indicated in the error message) uses **HTTP**.

NuGet requires that all sources and their resources use HTTPS.
If you want to continue using this source despite its HTTP resource, you must set the `allowInsecureConnections` flag to true in your NuGet.config file.

To learn more about NuGet Sources and Resource Endpoints, take a look at the [NuGet Sources and Resource Endpoints overview](../../api/overview).
Copy link
Contributor

@kartheekp-ms kartheekp-ms Oct 13, 2025

Choose a reason for hiding this comment

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

NuGet Sources and Resource Endpoints word was repeated twice in the same sentence.

One suggestion below but open for alternatives.

Suggested change
To learn more about NuGet Sources and Resource Endpoints, take a look at the [NuGet Sources and Resource Endpoints overview](../../api/overview).
To learn more about package sources and resource endpoints, take a look at the [NuGet Server API](../../api/overview).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Nu1302

4 participants