Skip to content

Instantly share code, notes, and snippets.

@dominicthomas
Created October 22, 2013 20:24
Show Gist options
  • Save dominicthomas/7107509 to your computer and use it in GitHub Desktop.
Save dominicthomas/7107509 to your computer and use it in GitHub Desktop.
Generates a 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 10,000 days
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
@Dharmakrdas
Copy link

I found a solution for this. Open the terminal in the specified path, like:

C:\Program Files\Java\jdk-17\bin>
Save the keystore to a folder where you have full permissions, and run the following command:

powershell
& "C:\Program Files\Java\jdk-17\bin\keytool.exe" -genkeypair -v -storetype PKCS12 -keystore "C:\Users\Dharam\my-upload-key.keystore" -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000

This worked successfully on my system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment