We are working on sops with gpg to encrypt and decrypt yaml files. When performing encryption or decryption using this approach most of the time it works but some times it fails with "no public key" available error. We are testing using gpg 2.1.18 version. This happens with both encrypt and decrypt.
We have verified with the gpg --list-keys command and it shows a valid public key.
pub rsa2048 2020-08-21 [SC] [expires: 2022-08-21]
uid [ unknown] Docker <Docker@cluster.local>
sub rsa2048 2020-08-21 [E] [expires: 2022-08-21]
Not sure what we are missing here. It would be really helpful if we can get some help here.
Thank you in advance!