I’m using the docker image
circleci/openjdk:8-jdk to build my maven project (POM in this case). After the build, I want to deploy this automatically to sonatype and for this, I need first to sign the artifacts.
So I setup a workflow to do exactly this. As part of the workflow, I have a command to import my GPG key (setup via envvar in my context, where
$GPG_SECRET_KEY is a base64-encoded secret key and
echo $GPG_SECRET_KEY | base64 --decode | $GPG_EXECUTABLE --import
But this returns the following error:
gpg: directory '/home/circleci/.gnupg' created gpg: keybox '/home/circleci/.gnupg/pubring.kbx' created gpg: /home/circleci/.gnupg/trustdb.gpg: trustdb created gpg: key CFD0F16D74196593: public key "Thomas Bouron (Apache email address) <email@example.com>" imported gpg: key CFD0F16D74196593/CFD0F16D74196593: error sending to agent: Inappropriate ioctl for device gpg: error building skey array: Inappropriate ioctl for device gpg: Total number processed: 1 gpg: imported: 1 gpg: secret keys read: 1 Exited with code 2
Any idea what is wrong here?