How do I generate a "Keystore" for Google Play?
Asked Answered
C

1

22

I am trying to figure out the Byzantine process for uploading an app to Google Play.

I'm using Phonegap's Applaud system for generating my app, and in order for me to create a "release build", I need to have generated a "Keystore".

However, when I look at Google's own Publishing Checklist, there is nothing on it about a "Keystore".

I found this answer here on Stack Overflow for generating a "Keystore", which theoretically should work on Ubuntu, which is what I'm using:

keytool –genkey –v –keystore just2try.keystore –alias someKindOfName –keyalg RSA –validity 10000

First, what exactly should I be putting in where it says someKindOfName? The name of my app?

In any case, when I run it, I get this response:

keytool error: java.lang.RuntimeException: Usage error, –genkey is not a legal command

I Googled for solutions, but the only ones I found were for Windows.

Can someone provide, or point to, a slightly more user friendly step by step guide for generating this "Keystore" thing I'm supposed to have? One with working comands for Ubuntu/Linux?

Cachalot answered 12/7, 2012 at 6:27 Comment(0)
W
33

The command that you have provided for generating the keystore is correct i.e.

keytool -v -genkey -v -keystore just2try.keystore -alias someKindOfName -keyalg RSA -validity 10000

Please do the following. Do not copy it, since I believe the error that you are seeing it related to some special characters. Type the whole thing as is in your command prompt or shell.

The just2try.keystore is any name for your Java based keystore file. You can select any name as you have done or give it some name that you know you can identify the keystore file with.

Finally, keep in mind that a keystore is like a collection of keys, where each one is identified by a name or an alias. So you should pick an alias that you know identifies the specific key. Examples : myorgkey, myandroidappkey, etc.

In case, you forget what alias' are present in the keystore, you can always use the -list command to see all the keys in the keystore. Example : keytool -v -list -keystore just2try.keystore

Witha answered 16/7, 2012 at 4:52 Comment(2)
can i ask you a few questions about generating a keystore file? do you generate one per app or just one per app developer for all apps that you want to create? i have entered what you suggested here in the command line and i get "Enter keystore password:" i tried to type a password here but nothing i'm typing appears. i am not used to the command line so do i need to type some command here? thanks....Zigmund
To start with you would want to just generate one keystore for the bunch of apps. Keep the keystore in a safe place and also remember the password. Now for the password that you are typing, usually it will not print out the characters that you are typing but will record them, so once you have typed out your password, just press enter and move forward. Hope this helps.Witha

© 2022 - 2024 — McMap. All rights reserved.