Hi
We experience a very weird problem when the following command is executed on macos using gpg 2.2.27 (installed by homebrew tool). echo "xxxxxxx" | gpg --batch --yes --passphrase-fd 0 --local-user 4BD5F787F27F97744BC09E019C1CA69653E98E56 --armor --detach-sign --no-default-keyring --secret-keyring secring.gpg --keyring pubring.gpg --homedir 50_ReleaseBOMUpstream/.gnupg -output dummy.txt.asc dummy.txt gpg: starting migration from earlier GnuPG versions gpg: porting secret keys from '/Users/cmoullia/.jenkins/workspace/50_ReleaseBOMUpstream/.gnupg/secring.gpg' to gpg-agent gpg: [don't know]: invalid packet (ctb=00) gpg: read_block: read error: Invalid packet gpg: import from '/Users/cmoullia/.jenkins/workspace/50_ReleaseBOMUpstream/.gnupg/secring.gpg' failed: Invalid keyring gpg: skipped "4BD5F787F27F97744BC09E019C1CA69653E98E56": No secret key gpg: signing failed: No secret key Do you know what is the problem ("gpg: [don't know]: invalid packet (ctb=00)")and how to fix it ? Cheers Charles Moulliard _______________________________________________ Gnupg-users mailing list [hidden email] http://lists.gnupg.org/mailman/listinfo/gnupg-users |
On 2021-02-11 at 18:24 +0100, Charles Moulliard via Gnupg-users wrote:
> Hi > > We experience a very weird problem when the following command > is executed on macos using gpg 2.2.27 (installed by homebrew tool). > > (...) > > Do you know what is the problem ("gpg: [don't know]: invalid packet > (ctb=00)")and how to fix it ? > > Cheers > > Charles Moulliard That secring.gpg file is corrupt. It's trying to automatically migrate /Users/cmoullia/.jenkins/ workspace/50_ReleaseBOMUpstream/.gnupg/secring.gpg to the new secret keyring format, but in doing so it is finding a NUL byte (at the beginning of the file, presumably), where it was expecting a secret key. Best regards _______________________________________________ Gnupg-users mailing list [hidden email] http://lists.gnupg.org/mailman/listinfo/gnupg-users |
As the file was present on the filesystem, I suspect another error then. Anyway, GPG should report a more user friendly message explaining what we should investigate to fix it. On Tue, Mar 2, 2021 at 11:20 PM Ángel <[hidden email]> wrote: On 2021-02-11 at 18:24 +0100, Charles Moulliard via Gnupg-users wrote: _______________________________________________ Gnupg-users mailing list [hidden email] http://lists.gnupg.org/mailman/listinfo/gnupg-users |
On 2021-03-03 at 09:17 +0100, Charles Moulliard via Gnupg-users wrote:
> As the file was present on the filesystem, I suspect another error > then. Anyway, GPG should report a more user friendly message > explaining what we should investigate to fix it. Of course the file is there. The problem is with its contents. Run gpg --list-packets secring.gpg that should begin with # off=0 ctb=95 tag=5 hlen=3 plen=... :secret key packet: ... but it will probably show you gpg: [don't know]: invalid packet (ctb=00) either due to nul bytes at the beginning, or after some valid pgp packets. Cheers _______________________________________________ Gnupg-users mailing list [hidden email] http://lists.gnupg.org/mailman/listinfo/gnupg-users |
Free forum by Nabble | Edit this page |