PostgreSQL 9.4 installation: "gpg: no valid OpenPGP data"

I am trying to install PostgreSQL 9.4 on a clean, new Debian Jessie machine.

I follow these instructions: https://wiki.postgresql.org/wiki/Apt#Quickstart

When I get to this point:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - 

I get this error:

 gpg: no valid OpenPGP data found. 

What am I doing wrong?

+5
source share
2 answers

These instructions are in order, you should suffer from connection problems (or get other content than expected). Do the following:

  • Run wget -o - https://www.postgresql.org/media/keys/ACCC4CF8.asc (without --quiet and without a channel in GnuPG) to check what is actually happening. Is wget an indication of any communication problems?
  • You can also download the file from your browsers, just save the text content with copy-paste to a text file and import it with apt-key add [path-to-file] (or, if someone who finds this question wants to import into GnuPG keyring by default, gpg --import < [path-to-file] ).

Most likely, wget does not find the root certificate referenced by the PostgreSQL site, you are behind some proxy that is not configured for wget , or a gateway that modifies the website; at least, the returned results are not key data in the format expected by GnuPG.

+1
source

In my case, the problem was caused by an incorrect https certificate from postgresql.

Just add -no-check-certificate to the wget command.

+1
source

All Articles