mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 05:26:03 +03:00
[GH-ISSUE #231] mkcert failed adding cert: Access is denied. #145
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davidsiagian on GitHub (Jan 8, 2020).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/231
Hi,
I tried to use mkcert on Windows.
However when I use mkcert -install, it is failed because access is denied.
I dont know the problem because I use cmd as administrator.
@Strandedpirate commented on GitHub (Jan 9, 2020):
On windows
mkcert -installmust be executed under elevated Administrator privileges. Open the command prompt as Administrator and try again.@arafel commented on GitHub (Jan 10, 2020):
Hi
From the image it doesn't look like that cmd is being run as admin; did you right-click on the "command prompt" entry in the menu and choose "run as administrator"? When I do that, it looks like the image attached - note the "Administrator:" in the window title.
@davidsiagian commented on GitHub (Jan 12, 2020):
@arafel @Strandedpirate Hi, thanks for your respond. My bad, I forgot to give image with cmd run as administrator.
I couldn't find any source with help.
@julian-code commented on GitHub (Feb 22, 2020):
I have the same issue.

@jbleyaert commented on GitHub (Mar 27, 2020):
I also have this issue.
@Alcadramin commented on GitHub (Apr 3, 2020):
same
@fabianberisha commented on GitHub (May 25, 2020):
same
@verfault commented on GitHub (May 26, 2020):
i have this issue too.
@adem commented on GitHub (Sep 20, 2020):
Looks like this is a permission issue with the keys stored in

C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys. When I try to modify the permissions of the parent folder to give the administrator full control for not just the folder, but also its sub-items, I get the following similar error:I haven't been able to resolve the situation yet. I even deleted the files altogether and rebooted, to no avail.
@adem commented on GitHub (Sep 20, 2020):
Workaround
Until more is known about this issue, you can use the following workaround to install the CA:
certmgr.msc(At this point, the Store Location was greyed out, and Current User was preselected for me)
rootCA.pemfile usually located in%localappdata%\mkcert> Next. When in doubt, double-check the output ofmkcert -installto find out the root CA path.Note
If you don't explicitly select the physical store Local Computer, you'll very likely run into the following error message, so make sure not to skip that part. This might be linked to the

mkcert -installissue we run into.@cheslijones commented on GitHub (Mar 21, 2021):
I have a similar issue. I was able to
mkcert -install, but now I'm unable to do anything related tomkcert:@rfay commented on GitHub (Mar 21, 2021):
@cheslijones that's mkcert being unable to reaad the CA that's in your own home directory. You need to change the permissions on that directory (AppData\Local\mkcert, or consider deleting the whole directory and doing
mkcert -installagain. Or is C:\Users\work possibly another user's homedir?@cheslijones commented on GitHub (Mar 21, 2021):
Ok, l deleted and retried which worked. That is my homedir.
@LichLord91 commented on GitHub (Jul 2, 2022):
Until #453 is merged I created a PowerShell script a while back that'll install the RootCA certs for you and replace it if the thumbprints are different/tell you if its already installed. Feel free to use if it if its to your liking. Just run it in the same directory as the rootCA pem files
Gist link
@bstiffler582 commented on GitHub (Jan 13, 2023):
I was able to resolve this by adding the mkcert executable to the exclusions list in Windows Defender.