Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sign with gradle and gpg2

Tags:

gradle

gnupg

The gradle signing plugin requires secring.gpg keyring file, according to the documentation: https://docs.gradle.org/current/userguide/signing_plugin.html

But since gpg version 2.1 the secring.gpg does not exist anymore. https://www.gnupg.org/faq/whats-new-in-2.1.html

Is there a possibility to use the signing plugin of gradle with gpg >= 2.1?

like image 939
haschibaschi Avatar asked Sep 28 '15 05:09

haschibaschi


2 Answers

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.

like image 130
Michael Rapp Avatar answered Oct 17 '22 17:10

Michael Rapp


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
like image 3
Nemo HJ Lee Avatar answered Oct 17 '22 17:10

Nemo HJ Lee