GPG Encryption/Decryption Failing

A NiceBoy wangtianjiao.wang959 at gmail.com
Tue Nov 17 02:35:57 CET 2020


Hello Sirisha,

I read from Mozilla's official documentation which states that SOPS
command-line client is preferred, the SOPS library should be used only
for decryption.

The link is here: https://godoc.org/go.mozilla.org/sops/v3

>This package should not be used directly. Instead, Sops users should install the command line client >via `go get -u go.mozilla.org/sops/v3/cmd/sops`, or use the decryption helper provided at >`go.mozilla.org/sops/v3/decrypt`.

>We do not guarantee API stability for any package other than `go.mozilla.org/sops/v3/decrypt`.

My two cents.

Best regards

On Fri, 13 Nov 2020 at 17:08, Sirisha Gopigiri via Gnupg-users
<gnupg-users at gnupg.org> wrote:
>
> Hi,
>
> We are trying to use SOPS+GPG to encrypt/decrypt yaml files and we have written some go wrapper using sops library to perform the required encryption/decryption. However when trying to execute this code the gpg library seems to be failing at keygeneration most of the time with the following error.
>
> failed to encrypt new data key with master key "681E3A89EB1DAFD36EB883120A73BB48E26694D8": could not encrypt data key with PGP key: golang.org/x/crypto/openpgp error: key with fingerprint 681E3A89EB1DAFD36EB883120A73BB48E26694D8 is not available in keyring and could not be retrieved from keyserver; GPG binary error: gpg binary failed with error: exit status 2, gpg: 681E3A89EB1DAFD36EB883120A73BB48E26694D8: skipped: No public key
>
> Seems like it is unable to fetch the public key, we are executing the code locally, so we are using the local public and private keys only.
>
> Though we can list the public key locally, we keep getting the above error quite frequently. However, the encryption/decryption is happening successfully the other times.
>
> Kindly let us know if we are missing anything.
>
> We are facing this error only with gpg 2.1.x version, gpg 1.4.x version seems to be working fine.
>
>
> Thank you in advance!
>
> Best Regards
> Sirisha Gopigiri
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users



More information about the Gnupg-users mailing list