How to generate gpg signing keys in bintray for jcenter in windows

For Linux/Mac you can use gpg. I learned how to do this here. I needed to prefix the following commands with sudo.

  1. Generate the keys

    gpg --gen-key
    

    Follow the defaults but enter your name and email and optionally a password.

  2. List the keys.

    gpg --list-keys
    

    which should show something like this:

    pub   2038R/91E83BF2 2017-05-13
    uid                  Bob <[email protected]>
    sub   2038R/E3872671 2017-05-13
    
  3. Upload the public key to a keyserver

    gpg --keyserver hkp://pool.sks-keyservers.net --send-keys PUBLIC_KEY_ID
    

    replacing PUBLIC_KEY_ID with your id (91E83BF2 in the example above).

  4. Export your public and private keys to a text file

    gpg -a --export [email protected] > public_key_sender.asc
    gpg -a --export-secret-key [email protected] > private_key_sender.asc
    
  5. Copy the contents of these files to Bintray at Edit Profile > GPG signing.

enter image description here


Windows users can generate GPG keys using GPG4Win.
There are many tutorials available, for example this one.