You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/errors-and-warnings/NU1302.md
+36-3Lines changed: 36 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,47 @@ f1_keywords:
8
8
- "NU1302"
9
9
---
10
10
11
-
# NuGet Warning NU1302
11
+
# NuGet Error NU1302
12
12
13
13
> 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.
14
14
15
15
### Issue
16
16
17
-
`myHttpSource` is an insecure HTTP source. We recommend using HTTPS sources instead.
17
+
`myHttpSource` is an insecure HTTP source. We recommend using an HTTPS source instead.
18
18
19
19
### Solution
20
20
21
-
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).
21
+
#### Option 1: Update the Source to Use HTTPS
22
+
23
+
If possible, update the package source to use `https://` instead of `http://`:
The [`SdkAnalysisLevel`](/dotnet/core/project-sdk/msbuild-props#sdkanalysislevel) property in your project can serve as a temporary workaround for managing HTTP sources.
48
+
If additional time is needed to resolve the HTTP error, you can lower the `SdkAnalysisLevel` to suppress errors temporarily.
49
+
Here's how it functions:
50
+
51
+
- For SDK Analysis Level value **below 9.0.100**, using HTTP sources triggers a warning ([NU1803](NU1803.md)).
52
+
- Starting with SDK Analysis Level **9.0.100 or higher**, HTTP sources result in an error (NU1302) unless `AllowInsecureConnections` is explicitly enabled.
0 commit comments