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

Deprecate http usage: nuget list promote warning to error for http sources #5698

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

Nigusu-Allehu
Copy link
Contributor

Bug

Fixes: NuGet/Home#13323

Regression? Last working version:

Description

This PR introduces changes to replace the current warning mechanism with an error message whenever an HTTP source is utilized. This modification aims to enhance security and encourage best practices by strictly enforcing the use of HTTPS over HTTP for source connections.

Example

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

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@Nigusu-Allehu Nigusu-Allehu requested a review from a team as a code owner March 19, 2024 17:18
@Nigusu-Allehu Nigusu-Allehu self-assigned this Mar 19, 2024
@@ -1155,40 +1170,38 @@ public void ListCommand_WhenListWithHttpSourceAndAllowInsecureConnections_WarnsC
server.Start();

// create the config file
Util.CreateFile(packageDirectory, "nuget.config", $@"
Copy link
Member

Choose a reason for hiding this comment

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

You did a really thorough job improving the tests, great job!

@Nigusu-Allehu Nigusu-Allehu merged commit 555ef43 into dev-feature-http-error Mar 19, 2024
14 of 16 checks passed
@Nigusu-Allehu Nigusu-Allehu deleted the dev-nyenework-http-error-list branch March 19, 2024 20:54
aortiz-msft pushed a commit that referenced this pull request Jun 18, 2024
* Deprecate http usage: `nuget search` promote warning to error for http sources (#5693)

* Deprecate http usage: `nuget list` promote warning to error for http sources (#5698)

* Deprecate http usage: `nuget push` promote warning to error for http sources (#5705)

* Deprecate http usage: `delete` operations, promote warning to error for http sources (#5703)

* Add `allowinsecureconnections` option (#5742)

* remove integration test for now (#5758)

* Deprecate http: Promote from warning to error in VS Options NuGet Package Manager (#5732)

* Deprecate http usage: `source` commands, promote warning to error for http sources (#5702)

* Deprecate http usage: `restore` scenarios promote warning to error for http sources (#5731)

* use `--allow-insecure-connections` for dotnet nuget add command (#5853)

* tests

* clean up

* clean up

* white space

* tests

* comment
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.

2 participants