<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Hi</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Thank you for the reply and we have looked into the documentation.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
But after debugging a little we found that we are running into this issue only if we use gpg 2.2.4 version. We tested the same code with gpg 1.4.20 version and it seems to work fine. I mean we ran the test cases for the code like 20 times and we haven't got
this error at least once. So we were thinking if we are missing out some configuration with gpg 2.2.4. Could you please help us?<br>
</div>
<div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family:"Arial Black",Arial,sans-serif; font-size:10pt; color:rgb(0,0,0)">
<span style="font-family:Arial,Helvetica,sans-serif">Thank you in advance!<br>
</span></div>
<div style="font-family:"Arial Black",Arial,sans-serif; font-size:10pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:"Arial Black",Arial,sans-serif; font-size:10pt; color:rgb(0,0,0)">
<span style="font-family:Arial,Helvetica,sans-serif">Best Regards</span></div>
<div style="font-family:"Arial Black",Arial,sans-serif; font-size:10pt; color:rgb(0,0,0)">
<span style="font-family:Arial,Helvetica,sans-serif">Sirisha Gopigiri</span></div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> A NiceBoy <wangtianjiao.wang959@gmail.com><br>
<b>Sent:</b> 17 November 2020 07:05<br>
<b>To:</b> Sirisha Gopigiri <sirisha.gopigiri@ericsson.com><br>
<b>Cc:</b> gnupg-users@gnupg.org <gnupg-users@gnupg.org>; E Guhan <e.guhan@ericsson.com>; Michelle Eslinger A <michelle.a.eslinger@ericsson.com>; Deepak Kataria <deepak.kataria@ericsson.com><br>
<b>Subject:</b> Re: GPG Encryption/Decryption Failing</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hello Sirisha,<br>
<br>
I read from Mozilla's official documentation which states that SOPS<br>
command-line client is preferred, the SOPS library should be used only<br>
for decryption.<br>
<br>
The link is here: <a href="https://godoc.org/go.mozilla.org/sops/v3">https://godoc.org/go.mozilla.org/sops/v3</a><br>
<br>
>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`.<br>
<br>
>We do not guarantee API stability for any package other than `go.mozilla.org/sops/v3/decrypt`.<br>
<br>
My two cents.<br>
<br>
Best regards<br>
<br>
On Fri, 13 Nov 2020 at 17:08, Sirisha Gopigiri via Gnupg-users<br>
<gnupg-users@gnupg.org> wrote:<br>
><br>
> Hi,<br>
><br>
> 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.<br>
><br>
> 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<br>
><br>
> 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.<br>
><br>
> 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.<br>
><br>
> Kindly let us know if we are missing anything.<br>
><br>
> We are facing this error only with gpg 2.1.x version, gpg 1.4.x version seems to be working fine.<br>
><br>
><br>
> Thank you in advance!<br>
><br>
> Best Regards<br>
> Sirisha Gopigiri<br>
> _______________________________________________<br>
> Gnupg-users mailing list<br>
> Gnupg-users@gnupg.org<br>
> <a href="https://protect2.fireeye.com/v1/url?k=146cabc1-4bf79282-146ceb5a-861fcb972bfc-84bc22f40f25e6db&q=1&e=7a9f0586-9961-40e8-9e54-93a010f749b1&u=http%3A%2F%2Flists.gnupg.org%2Fmailman%2Flistinfo%2Fgnupg-users">
https://protect2.fireeye.com/v1/url?k=146cabc1-4bf79282-146ceb5a-861fcb972bfc-84bc22f40f25e6db&q=1&e=7a9f0586-9961-40e8-9e54-93a010f749b1&u=http%3A%2F%2Flists.gnupg.org%2Fmailman%2Flistinfo%2Fgnupg-users</a><br>
</div>
</span></font></div>
</body>
</html>