I'm trying to generate a keystore file to sign my React Native Android app and publish it to Play Store.
I'm trying to do it as described in this docs: https://facebook.github.io/react-native/docs/signed-apk-android.html. Basically, I'm running the following in the terminal: keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
.
This command asks for the keystore password, but not for alias password. I need the alias password to setup my App Center build and to sign as described in the docs above. Can't understand where's is it stored.
Thank you!
You cannot create a keystore with a blank password with keytool since a while, but you can still do it programmatically.
An alias is specified when you add an entity to the keystore using the -genseckey command to generate a secret key, -genkeypair command to generate a key pair (public and private key) or the -importcert command to add a certificate or certificate chain to the list of trusted certificates.
Keytool uses storepass and keypass for different purposes. storepass is used to access the key store. keypass is used to access the particular key pair's private key. However, a password should not be specified on a command line or in a script unless it is for testing purposes, or you are on a secure system.
I've found a solution. The reason was that my keytool version generates PKCS12 keystore, non JKS. As it says Different store and key passwords not supported for PKCS12 KeyStores.
So I was able to generate a JKS file by passing -storetype jks
parameter (and it asked for two passwords). And now it says The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With