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

笑着哭i 提交于 2019-12-14 03:39:39

问题


I am unable to get GPG signing keys. Please any one tell me. Thanks How to generate gps signing keys in windows for jcenter


回答1:


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




回答2:


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 <name@example.com>
    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 name@example.com > public_key_sender.asc
    gpg -a --export-secret-key name@example.com > private_key_sender.asc
    
  5. Copy the contents of these files to Bintray at Edit Profile > GPG signing.




回答3:


Here is a nice tutorial for gen gpg-key https://help.github.com/articles/generating-a-new-gpg-key/

Some note

-For Ubuntu 14.04 we need to use gpg --gen-key instead of gpg --full-generate-key https://askubuntu.com/questions/1019793/how-to-solve-gpg-invalid-option-full-generate-key.

-For gen private key

gpg --armor --export-secret-keys {sec_value}
eg: gpg --armor --export-secret-keys 3AA5C34371567BD2

-When copy public key or private key, remember copy ALL (including -----BEGIN ...----- and -----END ...-----)




回答4:


I found solution, I needed it configure gpg signing in bintray. If you not created gpg keys follow this tutorial: https://help.github.com/articles/generating-a-new-gpg-key/

After you created gpg keys if you do not know how to copy private key in armored form follow this steps on git bash:

  1. list private keys: gpg --list-secret-keys
  2. copy long string after(or below) [SC]
  3. export armored private key: gpg --export-secret-keys --armor string you have copied > private_key.asc
  4. open private_key.asc with some editor(i used sublime text), and copy your private key

Hope it helps



来源:https://stackoverflow.com/questions/36858803/how-to-generate-gpg-signing-keys-in-bintray-for-jcenter-in-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!