I am trying to import a jfrog certificate into my keystore but getting the titled error. I used the following command to do this task:
keytool -importcert -file C:\Users\Ramen\Desktop\jfrog.cer -keystore "%JAVA_HOME%\jre1.8.0_202\lib\security\cacerts.jks -alias "JFROG_NEW"
Then it prompts me to put in password, at the end it says certificate was added to keystore and throws this error "keytool error:
java.io.FileNotFoundException: C:\Program Files\Java\jre1.8.0_202\lib\security (Access Denied)"
Please note that I can not run this command as administrator.
I tried all the answers I could get from stackoverflow from these links.
keytool error: java.io.FileNotFoundException: C:\cacerts (Access is denied)
keytool error: java.io.FileNotFoundException: cacerts (Access is denied)
Is there any workaround for this issue without logging in as an administrator?