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

How to trust HTTPS cert from WSL Ubuntu on Windows? #7166

Closed
AArnott opened this issue Jun 20, 2018 — with docs.microsoft.com · 5 comments · Fixed by #12395
Closed

How to trust HTTPS cert from WSL Ubuntu on Windows? #7166

AArnott opened this issue Jun 20, 2018 — with docs.microsoft.com · 5 comments · Fixed by #12395
Assignees
Labels
Pri1 Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue
Milestone

Comments

Copy link
Contributor

AArnott commented Jun 20, 2018

I'm using Windows Subsystem for Linux (Ubuntu) to host my ASP.NET Core web app. It has generated its own HTTPS self-signed cert. How do I configure my Windows cert store to trust that cert so that my Windows browser will navigate to it and trust it?
Note I've tried the command above, but it only trusts the Windows-generated cert. I need Windows to trust the Linux cert.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Copy link
Contributor Author

AArnott commented Jun 20, 2018

This helped out. I followed the instructions to export my Windows-generated cert:

dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p crypticpassword

Then in my WSL window I ran:

ASPNETCORE_Kestrel__Certificates__Default__Password="crypticpassword" ASPNETCORE_Kestrel__Certificates__Default__Path=/mnt/c/Users/andarno/.aspnet/https/aspnetapp.pfx dotnet watch run

That effectively set the environment variables so that linux would use the Windows generated-and-trusted cert. Then my Windows browser was happy to access it. :)

@scottaddie scottaddie added the Source - Docs.ms Docs Customer feedback via GitHub Issue label Jun 20, 2018
@Rick-Anderson
Copy link
Contributor

@guardrex where is the right place to surface this info? I'm thinking in another doc, but link to it here.

@Rick-Anderson
Copy link
Contributor

@scottaddie isn't this related to #3310 ?

@scottaddie
Copy link
Member

@Rick-Anderson I think so. Is there anything we want to change in the get started page? If not, I'll address it at the linked issue.

@Rick-Anderson
Copy link
Contributor

Make sure this page has a link showing how to set it up a cert for Ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pri1 Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants