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

There was an error trusting HTTPS developer certificate #3421

Closed
rodrickmakore opened this Issue Aug 12, 2018 · 9 comments

Comments

Projects
None yet
5 participants
@rodrickmakore
Copy link

rodrickmakore commented Aug 12, 2018

I am unable to trust dev-certs on my machine. The error I am getting when I run the command is "There was an error trusting HTTPS developer certificate". I am running Windows 10 version 1803 (OS Build 17134.191).

image

@blowdart

This comment has been minimized.

Copy link
Member

blowdart commented Aug 14, 2018

@javiercn

This comment has been minimized.

Copy link
Member

javiercn commented Aug 14, 2018

@rodrickmakore Can you try running dotnet dev-certs https --clean and then running dotnet dev-certs https --trust and see if that solves your problem?

@rodrickmakore

This comment has been minimized.

Copy link

rodrickmakore commented Aug 15, 2018

@javiercn I am still getting an error.

image

@javiercn

This comment has been minimized.

Copy link
Member

javiercn commented Aug 15, 2018

@rodrickmakore Hmmm. I can think of several possibilities:

  • There is a bug and your certificate store is on a state we don't account for.
    • I'm assuming your platform is Windows?
    • Could you look at your local user certificate store and see if there is a certificate like the following?
      • Check on CurrentUser\Personal
        image

      • Check on CurrentUser\Trusted Root Certification Authorities
        image

If there is a certificate like that in any of those two places. Can you remove them manually and try again?

@Eilon

This comment has been minimized.

Copy link
Member

Eilon commented Aug 27, 2018

Hi. We're closing this issue as no response or updates have been provided in a timely manner and we have been unable to reproduce it. If you have more details and are encountering this issue please add a new reply and re-open the issue.

@Eilon Eilon closed this Aug 27, 2018

@njebert

This comment has been minimized.

Copy link

njebert commented Sep 3, 2018

This is still an issue - I am seeing the error that @rodrickmakore described in his screenshot. I removed the localhost certificate from Certificates - Current User Personal/Certificates and retried, but was blocked by the same error as described above. I checked the other certificate location and a localhost certificate was not present there.

What is the next step that I can try to get unblocked on this?

@javiercn

This comment has been minimized.

Copy link
Member

javiercn commented Sep 4, 2018

@njebert Maybe the prompt where you are running the command on doesn't have permissions to modify the certificate store?

I'll try to give you a powershell script when I'm back in the office that generates an identical certificate to the one used by the tool and see if you are able to create it using that.

@njebert

This comment has been minimized.

Copy link

njebert commented Sep 4, 2018

@javiercn Could be it - I am running the commands from an administrator instance of PowerShell. Much appreciated - I will retest once I have your script.

@javiercn

This comment has been minimized.

Copy link
Member

javiercn commented Sep 8, 2018

@njebert Hi,

I've created a powershell script to help diagnose issues with the tool. https://gist.github.com/javiercn/9f2657f88498ce1b0b8c99d326131b54

Read through the script to ensure you are ok running it, run it with .\cert-diag.ps1, evaluate the output for anything that you want to censor and paste the output here.

The script also contains a switch -TryCreateCertificate that will create a certificate equivalent to the one the tool generates using powershell. You can try and run it at your own risk and see if that fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment