Skip to main content

Uploading Android keystore files to Bitrise

Abstract

You can upload multiple Android keystore files to Bitrise and use the one your app needs. This makes the Android code signing process much easier.

To be able to digitally sign your Android apps, and distribute them on the Google Play Store, you need a keystore file. You can store the keystore file in any accessible location and our Steps can use them but the easiest, most convenient way is to upload them directly to Bitrise.

To do so:

Multiple files

You can upload multiple keystore files to Bitrise. If you do, make sure your Steps use the right one, as they will have different URLs.

  1. Open your project on Bitrise with a user that has the Admin role on the project.

  2. On the main page of the project, click on the Project settings button.

    project-settings-button.png
  3. On the left, select Code signing and go to the Android tab.

  4. Click the Add keystore file button.

  5. In the dialog box, you can either drag-and-drop your keystore file to the Select an Android keystore file field, or click the field to browse your files.

    A keystore URL automatically gets generated once you upload the keystore file. Bitrise assigns an Environment Variable (BITRISEIO_ANDROID_KEYSTORE_URL) to the download URL (which is a time-limited, read-only download URL) of the file as the value. No need to download it manually as the Android Sign Step downloads it automatically.

  6. Fill out the displayed three input fields with your Android keystore credentials:

    • Keystore password

    • Keystore alias

    • Private key password

    add-android-keystore.png

    You can set the passwords and the alias when creating the key: Generate an upload key and keystore.

  7. Click Continue. The next page will show the new Environment Variables that will be available to your builds once you finish the file upload process:

    • $BITRISEIO_ANDROID_KEYSTORE_ALIAS

    • $BITRISEIO_ANDROID_KEYSTORE_PASSWORD

    • $BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD

    • $BITRISEIO_ANDROID_KEYSTORE_URL

    Each time you upload an additional keystore file after the first, the new file's respective Env Vars will have a number at the end. For example, $BITRISEIO_ANDROID_KEYSTORE_ALIAS_1, $BITRISEIO_ANDROID_KEYSTORE_ALIAS_2.

  8. Review your keystore data to make sure you've uploaded the correct file.

  9. Optionally, you can set up a custom ID for the keystore file: in the Custom keystore ID field, add the ID you want to use to identify your keystore file.

    The ID will replace the unique part of the keystore-related Env Vars: for example, if you set the ID to My_Best_App, the URL will be $BITRISEIO_ANDROID_KEYSTORE_URL_MY_BEST_APP.

  10. Click Add file.