2

The following two commands are separated by a pipe | character, which means they will be executed together, in one go:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

I need to run them separately, as two commands.

Actually these commands download and install the public signing key for elastic search.

But for some reason, they are giving me

gpg: no valid OpenPGP data found.

My web search tells me that executing both the commands separately might solve my problem. So I am trying to do that.

So the first command wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch returns fine, while the second one sudo apt-key add - goes forever, and never returns.

Shy
  • 215
  • 1
  • 3
  • 7

1 Answers1

0

First run:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch -O mykey

Then run:

sudo apt-key add <<< mykey
George Udosen
  • 35,970
  • 13
  • 99
  • 121
  • 1
    The second one still gives me `gpg: no valid OpenPGP data found.` – Shy Oct 06 '17 at 11:07
  • But this means the method to run those commands separately is correct, which answers this question. So thank you. – Shy Oct 06 '17 at 11:08