Can't seem to publish my updated pgp key for Travis to pick it up on occasion

last release was 2 months ago, and I proceeded as I usually did.

But today, for some reason, I getting this error, while I didn’t change anything in my setup, but locally and online

"gpg: no default secret key: unusable secret key"

First thing is first when using PGP, you need to make sure everything is up to date (licensees, etc), then you need to go into a highly verbose debugging scenario:

gpg-v --keyserver hkp://whatever-keyservers.net --send-key *MY_KEY*
gpg -v --keyserver hkp://whatever-keyservers.net --send-key *MY_KEY*
gpg -v --keyserver hkps://whatever-keyservers.net --send-key *MY_KEY*

One of them contains the encrypted data you want, this is why Travis is not picking up on them, it’s not Travis’s fault. If you were to run: gpg --version you’d see an expiry date, even though the original one is still there, it’d show all the times you’ve updated/made payments.

So this is not Travis’s fault, so now, update your .travis.yml to the following:

gpg -v --keyserver hkp://whatever-keyservers.net:80 --refresh-keys
gpg -v --list-keys

Your keys will then be updated before signing the artifacts, which was causing the issue, if you run into more issues let me know, and I’ll write a simple bash script to do this for you.

Montana (Travis CI Staff)

1 Like