12

after importing the der file to the key store as follow

keytool -keystore my-release-key.keystore  -importcert 
    -file ~/Downloads/upload_cert.der  -alias uploadcert  

I get an error when trying to assemble release APK

trusted certificate entries are not password-protected

If I add

-protected

to the import, I geth

keytool error: java.lang.IllegalArgumentException: password can't be null

and if I pass the password after -protected I get usage help message. not sure how to pass the password.

Any idea if I am on the right path to sign with google upload certificate der file ?

Nabil Sham
  • 2,305
  • 4
  • 26
  • 38
  • Possible duplicate of [Signing an APK with an upload key provided by Google Play](https://stackoverflow.com/questions/44070168/signing-an-apk-with-an-upload-key-provided-by-google-play) – Crispert Oct 30 '18 at 11:30

1 Answers1

2

Got the same problem and password can't be null problem may be passed by editing the comment like:

keytool -keystore parkimayaz.keystore  -importcert -file 
~/Downloads/upload_cert.der  -alias uploadcert -keypass "yourpass" -
storepass "yourpass"

Another info I used characters like (',#,^) on the password part which gave me some errors.

also please take a look at oracle keytool docs

  • And How can I get it ?? if I type after keytool -list it it says ::java.lang.Exception: The keystore file does not exist: /Users/myuser/.keystore – CarLoOSX Feb 08 '18 at 19:45