Listing all keys exited with code 2 that broke the script.
gpg: WARNING: unsafe permissions on homedir '/tmp/gpg'
gpg: /tmp/gpg/trustdb.gpg: trustdb created
gpg: skipped packet of type 12 in keybox
gpg: skipped packet of type 12 in keybox
gpg: skipped packet of type 12 in keybox
gpg: skipped packet of type 12 in keybox
gpg: skipped packet of type 12 in keybox
gpg: skipped packet of type 12 in keybox
gpg: skipped packet of type 12 in keybox
gpg: skipped packet of type 12 in keybox
/tmp/gpg/pubring.kbx
--------------------
...
[ID: 1064458] Command finished after 2 secs, exit value: 2
Listing all keys exited with code 2 that broke the script.