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
Executable not found in path #53
Comments
mkcert-v1.1.0-windows-amd64.exe -install
Using the local CA at "C:\Users\XXXXX\AppData\Local\mkcert" ✨
The local CA is now installed in the system trust store! ⚡️
Note: Firefox support is not available on your platform. ℹ️
ERROR: failed to execute "keytool -list": exec: "": executable file not found in %PATH%
keytool -list
keytool error: java.lang.Exception: Keystore file does not exist: C:\Users\alexa\.keystore |
That means you don't have java's |
I ran
|
I'm having the same issue and getting the same response as @aprasadh from |
@cretz Is this something you encountered in your local instance of mkcert? Seems to be looking for a java tool to created a keystore. |
@nickkaczmarek - No it is not, and I use the JVM frequently. I didn't even know that added the root in my Java keystore, heh. This appears to be a new thing @adamdecaf added in #38. There appear to be some things wrong such as in its java check it calls keytool even if hasKeytool is false. Also, it assumes it's a JDK and not a JRE by its cert path lookup. It's going to happen on all Windows OS's, because it looks for |
I saw that jre path also and thought it looked fishy. I ended up removing Java from my machine to get past it but fixing the project is probably a more sustainable route. |
Yep. I missed that before, sorry. I don't have a windows machine to test with, but could y'all try this patch? |
@adamdecaf that might work, but I think the jre path might be problematic as well. I can take a look tomorrow if no one else does. |
Ah okay. If the install path for java (or the extracted file structure) is different for windows we can probably work around the differences. |
It's not. The difference is JRE vs JDK. |
That makes sense. Do you know if the structure is the same across OS's? We could just check for both paths. |
I believe so, yes |
me too |
So @cretz, it looks like when you implemented the windows functionality, the java change was unnecessary for a CA to be created in windows. Is it worth allowing an opt out of using java? I'm not sure how the keystore works, but it seems to be unnecessary. @adamdecaf or @FiloSottile, what do you think about a java opt out? I really don't know how this works, but I'd prefer to have mkcert not use java even if it's installed on my machine. |
Why would we opt out of java? It's been useful at a previous employer to add the company CA into the truststore. |
I was referring to having the option to choose to not use it when generating a CA or certificate. My knowledge is really lacking around what mkcert really does so forgive me if I'm super off base and my specific use case is to generate certificates for local development. I'm simply saying that this worked without using Java when @cretz added windows support so in theory it should work without using Java and therefore possible to pass an option to not use Java when installing a CA or creating certificates. Edit: |
To be clear, when |
In that case, no. I got around this pre @adamdecaf suggested fix by removing |
In any case, I have this working on my mac at home and windows pc at work and I'm so glad there is such a simple tool to do this. I've seen there are others, but this piques my interest especially since it's written in go. |
@FiloSottile @adamdecaf I don't know if this is the correct way of doing it, but as a stop gap for the people experiencing this issue until @adamdecaf has #54 finished and accepted, the temporary solution seems to be delete or rename |
Thanks everyone, let me know if v1.1.1 fixes this. |
For Windows installation, you can use those commands: REM Define %JAVA_HOME% variable
for /d %%i in ("\Program Files\Java\jdk*") do set JAVA_HOME=%%i
REM Add %JAVA_HOME% VARIABLE to %PATH% variable
setx PATH "%JAVA_HOME%\bin";"%PATH%" -m |
I had the same issue today on Mojave. I ended up manually running keytool to kick it into action by doing However then still had the odd JAVA_HOME issue - I used a pretty dodgy workaround and added an bash alias of 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! |
ty @pedrovgs |
I tried running
mkcert
version 1.1.0 in windows. I got the following error.The text was updated successfully, but these errors were encountered: