Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Nu1302 documentation with more information #3363

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Nigusu-Allehu
Copy link
Contributor

@Nigusu-Allehu Nigusu-Allehu commented Nov 20, 2024

@Nigusu-Allehu Nigusu-Allehu requested review from a team as code owners November 20, 2024 19:01
Copy link

Learn Build status updates of commit 89bcb2a:

💡 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 13, Column 235: [Suggestion: other-site-link-broken - See documentation] Link 'https://aka.ms/nuget-https-everywhere' points to a 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.

For any questions, please:


> You are running the 'restore' operation with an 'HTTP' source: myHttpSource. NuGet requires HTTPS sources. To use an HTTP source, you must explicitly set 'allowInsecureConnections' to true in your NuGet.Config file. Please refer to https://aka.ms/nuget-https-everywhere for more information.

### Issue

`myHttpSource` is an insecure HTTP source. We recommend using HTTPS sources instead.
`myHttpSource` is an insecure HTTP source. We recommend using an HTTPS sources instead.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`myHttpSource` is an insecure HTTP source. We recommend using an HTTPS sources instead.
`myHttpSource` is an insecure HTTP source. We recommend using an HTTPS source instead.


### Solution

This can be fixed either by removing the HTTP source or disabling HTTP Errors for the specific source by using `allowInsecureConnections` option in your [NuGet config file](../../reference/nuget-config-file.md).
#### Option 1: Update the Source to Use HTTPS
If possible, update the package source to use `https://` instead of `http://`:
Copy link
Member

Choose a reason for hiding this comment

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

Add space after each heading.
It's a good idea to install markdown lint to help you catch these issues.

```

#### Option 3: Consult SDK Analysis Level
Ensure that the project’s `SdkAnalysisLevel` allows HTTP sources:
Copy link
Member

Choose a reason for hiding this comment

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

We should probably link to the actual SdkAnalysisLevel docs. Similar to how this is done in the NU19* codes.

The value can be explicitly set to direct to revert back to .NET 8's default. Alternatively, the property SdkAnalysisLevel can be set to 8.0.400 to temporarily disable all new warnings and errors introduced in newer versions of the SDK. Specifically in this case, the default value of NuGetAuditMode is changed back to direct.

The following Ensure that the project’s SdkAnalysisLevel allows HTTP sources: makes me think SdkAnalysisLevel is about supporting, but it's really about previous behavior.
SdkAnalysisLevel won't always work. The primary motivator behind it is a temporary usage until you address the problem later, so let's rephrase is in a way to reflect that.

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.

Create a documentation for HTTP errors introduced for insecure sources
2 participants