kbpgp icon indicating copy to clipboard operation
kbpgp copied to clipboard

What does the error 'Error: bad PGP armor found; expected a newline' mean?

Open speckles opened this issue 5 years ago • 1 comments

The source of this error may be from missing the new line under your key header.

IE, this is wrong and will cause the error

-----BEGIN PGP PUBLIC KEY BLOCK-----
blahblahblah..

This what it should look like

-----BEGIN PGP PUBLIC KEY BLOCK-----

blahblahblah..

This may seem obvious to anyone familiar with pgp, but I spent far too long trying to figure this out. So I am posting this to give the next person who runs into this dumb error the search result I wish I'd had.

speckles avatar Apr 08 '20 17:04 speckles

Even more specifically, if there's metadata, the empty line needs to be after that, e.g.

-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.1.13
Comment: https://keybase.io/crypto

blahblahblah..

jaredjensen avatar Feb 22 '23 23:02 jaredjensen