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

[Feature Request] Add switch to 'dotnet restore' to ignore repo cert issues #14692

Open
mahamr opened this issue Nov 24, 2020 · 3 comments
Open
Milestone

Comments

@mahamr
Copy link

mahamr commented Nov 24, 2020

Hi Team,
Many command-line tools that make outbound HTTPS calls have the ability to disable cert checks or ignore cert-related warnings altogether (i.e. curl -k, Invoke-WebRequest -SkipCertificateCheck, etc.). This could be a valuable feature to have for the dotnet restore command, especially when private repos are in-use and there are known (or even as-yet-unknown) cert-related issues.

Having a feature like this has been mentioned here as well:
dotnet/core#1668 (comment)

Here's a good example for why this would be useful, with a customer environment.
This is an issue I opened some time ago in the runtime repo where dotnet restore was failing due to a certificate policy issue in the chain, for a private repo:
dotnet/runtime#41352
In that environment, SocketsHttpHandler on 2.1+ was not as forgiving as libcurl under-the-hood was in 2.0 and older. The issue worked-around by setting UseSocketsHttpHandler = false which is not ideal.

I believe having a feature like this could be useful to many folks.

Thank you!

@mahamr
Copy link
Author

mahamr commented Jan 15, 2021

I just read up on the .NET 5 Networking changes and came across this: https://devblogs.microsoft.com/dotnet/net-5-new-networking-improvements/#consistent-cross-platform-implementation

[...] we decided to remove the platform specific handlers from System.Net.Http.dll completely. In .NET 5, it is no longer possible to switch back to them with the "System.Net.Http.UseSocketsHttpHandler" AppContext switch as it used to be.

This effectively means the scenario I opened this issue for is now completely broken when the dotnet CLI used is from .NET 5 as of now.

@marcpopMSFT marcpopMSFT added the untriaged Request triage from a team member label Apr 27, 2021
@marcpopMSFT marcpopMSFT removed the untriaged Request triage from a team member label Aug 1, 2023
@marcpopMSFT marcpopMSFT added this to the Backlog milestone Aug 1, 2023
@marcpopMSFT
Copy link
Member

Old bug triage. @aortiz-msft @JonDouglas does nuget have the capability for this? I assume not. I have not seen other asks for this.

@aortiz-msft
Copy link

Looks similar to NuGet/Home#12786

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

No branches or pull requests

4 participants