[GH-ISSUE #96] Error running mkcert-v1.2.0-windows-amd64.exe -install #52

Closed
opened 2026-02-25 22:32:29 +03:00 by kerem · 9 comments
Owner

Originally created by @DrDrrae on GitHub (Jan 7, 2019).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/96

I'm receiving an error when runing mkcert 1.2.0 on Windows. I downloaded the prebuilt binary.

Windows 10 1809 17763.195
Running cmd.exe as Administrator.

ERROR: failed to generate CA certificate: asn1: string not valid UTF-8

Originally created by @DrDrrae on GitHub (Jan 7, 2019). Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/96 I'm receiving an error when runing mkcert 1.2.0 on Windows. I downloaded the prebuilt binary. Windows 10 1809 17763.195 Running cmd.exe as Administrator. ERROR: failed to generate CA certificate: asn1: string not valid UTF-8
kerem 2026-02-25 22:32:29 +03:00
Author
Owner

@NicolasCARPi commented on GitHub (Jan 7, 2019):

What if you try from Powershell.exe instead of cmd.exe?

<!-- gh-comment-id:452016503 --> @NicolasCARPi commented on GitHub (Jan 7, 2019): What if you try from Powershell.exe instead of cmd.exe?
Author
Owner

@adamdecaf commented on GitHub (Jan 7, 2019):

What's the username you're using (on the Windows computer) to run mkcert with? That's put into the certificate.

<!-- gh-comment-id:452017509 --> @adamdecaf commented on GitHub (Jan 7, 2019): What's the username you're using (on the Windows computer) to run mkcert with? That's put into the certificate.
Author
Owner

@DrDrrae commented on GitHub (Jan 7, 2019):

Powershell.exe is the same.

Does the computer get used at any point in the process? I just remembered that my computer name is "¡" (upside down exclamation point). I'll try on another computer.

<!-- gh-comment-id:452020065 --> @DrDrrae commented on GitHub (Jan 7, 2019): Powershell.exe is the same. Does the computer get used at any point in the process? I just remembered that my computer name is "¡" (upside down exclamation point). I'll try on another computer.
Author
Owner

@adamdecaf commented on GitHub (Jan 7, 2019):

Yep. The hostname as well:

github.com/FiloSottile/mkcert@da4da8a4bc/cert.go (L34-L39)

<!-- gh-comment-id:452020535 --> @adamdecaf commented on GitHub (Jan 7, 2019): Yep. The hostname as well: https://github.com/FiloSottile/mkcert/blob/da4da8a4bc86e0dff9c338c547bb1298220d5433/cert.go#L34-L39
Author
Owner

@DrDrrae commented on GitHub (Jan 7, 2019):

That's probably the issue. Doesn't like the upside down exclamation point as the hostname.

<!-- gh-comment-id:452021064 --> @DrDrrae commented on GitHub (Jan 7, 2019): That's probably the issue. Doesn't like the upside down exclamation point as the hostname.
Author
Owner

@NicolasCARPi commented on GitHub (Jan 7, 2019):

Using non ascii characters as a hostname sounds like a bad idea from the start, but that's just my 2 cents :) (it reminds me of Mac users putting '/' in filenames and not seeing an issue with that)

<!-- gh-comment-id:452027861 --> @NicolasCARPi commented on GitHub (Jan 7, 2019): Using non ascii characters as a hostname sounds like a bad idea from the start, but that's just my 2 cents :) (it reminds me of Mac users putting '/' in filenames and not seeing an issue with that)
Author
Owner

@DrDrrae commented on GitHub (Jan 7, 2019):

My computer name was 🍕 for a while but it caused issues with Windows Subsystem for Linux. Guess I found another issue.

It is, as far as I know, supported in Windows 10 and even works in a domain environment.

<!-- gh-comment-id:452032354 --> @DrDrrae commented on GitHub (Jan 7, 2019): My computer name was 🍕 for a while but it caused issues with Windows Subsystem for Linux. Guess I found another issue. It is, as far as I know, supported in Windows 10 and even works in a domain environment.
Author
Owner

@FiloSottile commented on GitHub (Jan 8, 2019):

Unicode should work in certificates, so the issue here seems to be that the hostname output is not UTF-8. Anyone better versed than me on Windows character encodings want to take a look?

<!-- gh-comment-id:452382170 --> @FiloSottile commented on GitHub (Jan 8, 2019): Unicode should work in certificates, so the issue here seems to be that the `hostname` output is not UTF-8. Anyone better versed than me on Windows character encodings want to take a look?
Author
Owner

@LuomingXu commented on GitHub (Mar 24, 2019):

same problem...
Windows, v1.3.0

<!-- gh-comment-id:475941736 --> @LuomingXu commented on GitHub (Mar 24, 2019): same problem... Windows, v1.3.0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mkcert#52
No description provided.