travis-cignupgmaven-gpg-plugin

can't seem to publish my updated pgp key for Travis-CI to pick it up


I've made some releases to Maven central for my project over the years, using Travis-CI. The last release was 2 months ago, and I proceeded as I usually did.

But today, for some reason, I am getting this error, while I didn't change anything in my setup :

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

After some research, I realized my key had expired.. so I found few resources that explained how to update the expiry date. I followed and pushed the date by 2 years, and now on my machine, I have this when I list the keys, so it looks OK :

enter image description here

Then, I publish the key and don't get any error message (so I assume it goes well) :

enter image description here

Finally, I trigger my failing travis-ci build again, but I keep having the same error.

I added a few commands before the actual deployment to get more information - indeed, my key is still seen as expired :

enter image description here

What else can I try to check my updated key is properly published, and that Travis-ci gets it?


Solution

  • One thing that helped me investigate : we can check our key on the server through a basic web interface, on http://pool.sks-keyservers.net - it confirmed my key was not updated there.

    I tried few more commands to send my key based on what I could find here and there :

    One of them must have made a difference, because I now see an updated expiry date, even though the original one is still there.

    Finally, I updated my travis-ci file to run these 2 commands :

    gpg -v --keyserver hkp://p80.pool.sks-keyservers.net:80 --refresh-keys
    gpg -v --list-keys
    

    and I got the confirmation my keys were updated before signing the artifacts