Unable to get GPG key via curl [SOLVED]

Hello,

I’m running LUbuntu 18.04, and following the guidance in the article
https://support.plex.tv/articles/235974187-enable-repository-updating-for-supported-linux-server-distributions/?_ga=2.1110392.897628164.1546872326-404803842.1542815356

but when I type the command:

curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -

I get the message “Could not resolve host: downloads.plex.tv” and then “gpg: no valid open PGP data found”

When I add plex to the repository via the command:

echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

That works and adds plex to the repositories, so obviously the computer has no problem resolving the “downloads.plex.tv” location.

Two questions:

  1. Is there an alternate way to get the public key?
  2. I can download the file “PlexSign.key” from the “Enable repository updating …” link above. Is there a way I can point the system to that key?

[edit: I tried directly downloading the PlexSign.key file, and then importing it via:

gpg --import PlexSign.key 

That told me that my keybox was create, and the public key “Plex Inc.” was imported. But then doing sudo apt-get update resulted in the same behavior as before, found the files, then returned “no public key” and would not continue the update.
/edit]

Thanks in advance for any help!

[Solution]
There is a newer function of apt which supports getting keys directly. So:
apt-key adv --fetch-keys https://downloads.plex.tv/plex-keys/PlexSign.key will correctly import the plex key.
Doing apt-get update seems to work normally, but now I’m getting a “Conflicting Distributions” error message.
Since my original problem was not being able to get the GPG key, and the apt-key method above works to import the key, I’m calling this [Solved].
Moderators: Consider passing this to the folks in charge of the “Enable repository updating …” page so they can add this as an alternative.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.