gpg private key not valid when used in github secrets

Viewed 53

I am currently trying to set up my CI in github enterprise where one step involves the usage of git secret. I'd like to use the following command in my CI

echo -e "$GPG_PRIVATE_KEY" | gpg --batch --yes --passphrase "$GPG_PASSPHRASE" --import

I created both secrets GPG_PRIVATE_KEY GPG_PASSPHRASE under the Secrets tab in github and the passphrase is also working just fine (tested with other commands). But I can't get the private key working. I used the output from gpg --armor --export-secret-key myapp@test.com but apparently thats not a valid format since the CI tells me

gpg: no valid OpenPGP data found.

Can github not handle the format from the export command or what am i doing wrong?

0 Answers
Related