You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows系统下使用管理员权限安装mkcert时遭遇Access is denied错误的技术求助

Fixing "ERROR: add cert: failed adding cert: Access is denied" when running mkcert -install as admin on Windows

Hey there, let's work through this mkcert access denied issue you're hitting—even with admin rights, Windows can throw these permission blocks due to specific system quirks. Here are some practical fixes to try:

  • Switch to Command Prompt (CMD) instead of PowerShell
    Sometimes PowerShell's security policies or environment setup can get in the way. Give this a shot:

    1. Right-click the Start menu and pick "Command Prompt (Admin)" (or open Windows Terminal as admin and switch to a CMD tab).
    2. If mkcert.exe isn't in your system PATH, navigate to the folder where it's saved using cd <path-to-mkcert>.
    3. Run mkcert -install and see if it works.
  • Manually import the mkcert root certificate
    The automatic install might be failing to write to the Trusted Root store, so let's add it manually:

    1. In your admin PowerShell, run mkcert -CAROOT—this will print a folder path (usually something like C:\Users\<YourUsername>\AppData\Local\mkcert).
    2. Open that folder and find the rootCA.pem or rootCA.crt file.
    3. Press Win+R, type certmgr.msc, and hit Enter to launch the Certificate Manager.
    4. Expand Trusted Root Certification Authorities > Certificates.
    5. Right-click "Certificates" > All Tasks > Import.
    6. Follow the wizard, select the rootCA file from step 2, and confirm you're importing it into the "Trusted Root Certification Authorities" store.
  • Ensure mkcert is up-to-date and in a trusted system path
    Outdated versions or non-system paths can cause permission issues:

    1. Grab the latest Windows binary of mkcert (look for the official release package).
    2. Move mkcert.exe to C:\Windows\System32—this directory has built-in system permissions that often resolve access problems.
    3. Restart your admin shell and run mkcert -install again.
  • Temporarily adjust UAC settings (for troubleshooting only)
    If all else fails, UAC might be blocking the operation even with admin rights:

    1. Open Control Panel > User Accounts > Change User Account Control settings.
    2. Slide the notification bar down to "Never notify" (don't forget to set this back to your original setting after testing!).
    3. Restart your PC, launch an admin shell, and try the install command once more.

If you're still stuck, check the Windows Event Viewer (look under "Windows Logs > Application") for more detailed error messages—they might point to exactly which certificate store or permission is causing the block.

内容的提问来源于stack exchange,提问作者Syed Zeeshan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 05:37:32