mkcert: Executable not found in path
I tried running mkcert version 1.1.0 in windows. I got the following error.
$ mkcert-v1.1.0-windows-amd64.exe example.orgUsing the local CA at "C:\Users\XXXXX\AppData\Local\mkcert"ERROR: failed to execute "keytool -list": exec: "": executable file not found in %PATH%
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 28 (9 by maintainers)
Commits related to this issue
- java: fix paths for Windows and JRE (#54) Fixes #53 — committed to FiloSottile/mkcert by adamdecaf 6 years ago
I had the same issue today on Mojave.
I ended up manually running keytool to kick it into action by doing
keytool -genkeypairwhich fixed thekeytool error: java.lang.Exception: Keystore file does not existerror.However then still had the odd JAVA_HOME issue - I used a pretty dodgy workaround and added an bash alias of
alias mkcert="unset JAVA_HOME && mkcert"So just for that terminal session it would unset it - and it seems to then work!
I just deleted JAVA_HOME env var and it just worked like a charm. Thanks!
unset JAVA_HOMEdid the trick for meFor Windows installation, you can use those commands:
To be clear, when
JAVA_HOMEis set, both the Java and the system trust stores have the certificate installed. Would you still want to selectively disable that, even if this issue was fixed? If so, please open a separate issue for that feature request.Yep. I missed that before, sorry. I don’t have a windows machine to test with, but could y’all try this patch?
https://github.com/FiloSottile/mkcert/pull/54
I’m having the same issue and getting the same response as @aprasadh from
"%JAVA_HOME%\bin\keytool.exe" -listas well askeytool -list. This isn’t something I recall having to do for mkcert on macos or ubuntu.