2

I have problems importing my GPG-Keys into my new installation of debian. I exportet the private-key a few years ago. Now I am trying to get everything running under a new debian.

I tried to do

  gpg --allow-secret-key-import --import private-key.asc

But I only get this:

gpg: Keine gültigen OpenPGP-Daten gefunden.
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 0

which translates to:

gpg: No valid OpenPGP-Data found
gpg: Number of processed Keys : 0

The file looks correct and starts with

--BEGIN PGP PRIVATE KEY BLOCK-----
Version: GnuPG v1.4.9 (GNU/Linux)

and ends with

-----END PGP PRIVATE KEY BLOCK-----

what could be wrong?

bitboxer
  • 181
  • 1
  • 8

1 Answers1

4

Found the answer. There were some --- missing at the beginng.

bitboxer
  • 181
  • 1
  • 8
  • It was driving me crazy until I found this answer and I realized the issue: I was piping the wrong command, making gpg to receive an error as stdout. Thank you so much. – inakiabt Aug 11 '22 at 20:23