How to sign with gradle and gpg2

I just encountered the same issue and solved it by manually creating a secring.gpg file by executing the following terminal command:

gpg --keyring secring.gpg --export-secret-key XXXXXXXX > secring.gpg

You have to replace XXXXXXXX with the ID of the key you want to use. You can list all available keys by using the command gpg --list-key.

Edit: I forgot to mention, that I am using Linux.


I also faced with the same issue that I could'n solve with the gpg --export-secret-key, like this.

gpg: WARNING: nothing exported

Actually my gpg's version was 1.4.xx (with gpg --version) and there was another: gpg2.

So try this:

gpg2 --export-secret-key XXXXXXXX > secring.gpg

Tags:

Gnupg

Gradle