-1

I am trying to generate a release key hash for my Android app, following the Facebook docs, I have no problem creating the debug with:

keytool -exportcert -alias plicprintdebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

It is asking for a password, I enter "android" and got the debug key.

But for the release key when I enter:

keytool -exportcert -alias plicpreleasekeyfb -keystore /Users/vedtam/Desktop | openssl sha1 -binary | openssl base64

the terminal window spits a key, but it does not prompt for a password, and does not write anything on my desktop. I was reading this indicates an error, and the given key will be invalid.

Can someone explain how to generate the Facebook release key correctly on mac please? Thanks!

== UPDATE ==

Thanks to Mattia, I have figured out, and while there is almost 0 example out there regarding the generation of a Facebook Key Hash I hope this will guide others:

you need not only the alias to have the name of the production key, but it must be written out after the RELEASE_KEY_PATH:

keytool -exportcert -alias plicprint -keystore /Users/vedtam/Desktop/plicprint | openssl sha1 -binary | openssl base64

Edmond Tamas
  • 3,148
  • 9
  • 44
  • 89

1 Answers1

3

You are using /Users/vedtam/Desktop as value for the options keystore. It's not correct, you should also specify also the file name, for example:

/Users/vedtam/Desktop/production.keystore

Once you find the path of your production keystore modify the command like this:

keytool -exportcert -alias RELEASE_KEY_ALIAS -keystore /Users/vedtam/Desktop/production.keystore | openssl sha1 -binary | openssl base64

Mattia Maestrini
  • 32,270
  • 15
  • 87
  • 94
  • same, does not prompt for pass, and no file on my desktop. Do I need to be in a specific folder while generating? – Edmond Tamas May 31 '15 at 16:48
  • Where is located your production keystore? – Mattia Maestrini May 31 '15 at 16:50
  • if you mean the key I use for signing my android app when exporting via eclipse is in a different place. – Edmond Tamas May 31 '15 at 16:55
  • You need to put this path instead `/Users/vedtam/Desktop/` – Mattia Maestrini May 31 '15 at 16:56
  • I have copied the key to my desktop, which was generated by Eclipse when signing my app before uploading into the play store, but it does not have any extension it is simply: "plicprint". If I try with plicprint.keystore / or only "plicprint", still got no prompt for the password...:( and thanks for your support! – Edmond Tamas May 31 '15 at 17:02
  • 1
    Check the path, if it doesn't prompt for the password it means the path you specified is incorrect. If your keystore doesn't have .keystore extension you shouldn't put .keystore in the filename. – Mattia Maestrini May 31 '15 at 17:06
  • Ok, now I got closer: keytool -exportcert -alias plicprint -keystore /Users/vedtam/Desktop/ | openssl sha1 -binary | openssl base64 I guess this is the correct syntax. Bot still does not propt for my pass – Edmond Tamas May 31 '15 at 17:06
  • 1
    Your -keystore option **can't** be /Users/vedtam/Desktop/. You must put the path name of your keystore. – Mattia Maestrini May 31 '15 at 17:10