Removing Repository GPG Key using Hammer-CLI

Is it possible to remove the inherited Product GPG Key for a repository using hammer?

I have a product which has a GPG Key on it which gets inherited by the repositories underneath the product, but there is one repository which I need to remove the GPG Key from. I can do it through the GUI, but I’m trying to script out the creation of several repositories across multiple Foreman servers, so it would make life a lot easier if I could just integrate it in.

I’ve tried passing both --gpg-key-id “0” and --gpg-key-id “” to the hammer repository update command, but didn’t get anywhere with that.

Hi @mclausen,

Could you try to pass --gpg-key-id NIL to see if it helps?

hammer repository update --organization-id 1 --id ## --gpg-key-id NIL worked perfectly…

Interestingly, the NIL value in the create still populated the GPG Key, but the update removed it (so I basically add another step to the script which isn’t the end of the world).

Thanks!