-2

When I generate a private key (for signing apps) using this command:

keytool -genkey -v -keystore myappname.keystore -alias myappname -keyalg RSA -keysize 2048 -validity 10000

... I get asked a series of questions by keytool:

What is your first and last name? What is the name of your organizational unit? What is the name of your organization? What is the name of your City or Locality? What is the name of your State or Province? What is the two-letter country code for this unit?

After I answer all questions, I get prompted again in an infinite loop, what am I doing wrong?

I use this sample here: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/part_2_-_signing_the_android_application_package/visual-studio-xa-4.2.6-to-6.1/

petey
  • 16,914
  • 6
  • 65
  • 97
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
  • When I attempt to reproduce your problem on my system the procedure you described, it "works for me". I answer all of the questions, and then`keytool` asks me to verify the details, asks for a key password, and finally creates the keystore and exits. You need to be more specific about what you are doing. – Stephen C Apr 02 '17 at 03:38
  • Duplicate: http://stackoverflow.com/questions/33381252/keytool-genkey-runs-in-a-loop-to-generate-keystore-file/33414701 – Omikron Apr 02 '17 at 23:34

1 Answers1

3

When keytool asks

Is CN=..., OU=..., O=..., L=..., ST=..., C=... correct?
  [no]:

you have to answer

yes
nandsito
  • 3,782
  • 2
  • 19
  • 26