From e20eb9b21215bf107e9d6095d31de21b64929531 Mon Sep 17 00:00:00 2001 From: Pierre Cavin Date: Mon, 10 Jun 2024 22:55:29 +0200 Subject: [PATCH] fix: fix trying to import revoked key https://github.com/nodejs/release-keys/pull/28 --- lib/nodelix/version_manager.ex | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/nodelix/version_manager.ex b/lib/nodelix/version_manager.ex index 49581f6..84986f7 100644 --- a/lib/nodelix/version_manager.ex +++ b/lib/nodelix/version_manager.ex @@ -145,7 +145,7 @@ defmodule Nodelix.VersionManager do Logger.debug("Using GPG to retrieve #{length(missing_keys)} missing signing keys") {messages, _} = - GPGex.cmd!(["--keyserver", "hkps://keys.openpgp.org", "--recv-keys"] ++ missing_keys, + GPGex.cmd!(["--keyserver", "hkps://keyserver.ubuntu.com", "--recv-keys"] ++ missing_keys, keystore: keystore ) @@ -163,12 +163,9 @@ defmodule Nodelix.VersionManager do still_missing_keys = missing_keys -- imported_keys - # because some keys are unverified on keys.openpgp.org, - # we make a subsequent call to the Ubuntu keyserver - GPGex.cmd!( - ["--keyserver", "hkps://keyserver.ubuntu.com", "--recv-keys"] ++ still_missing_keys, - keystore: keystore - ) + if length(still_missing_keys) > 0, + do: + Logger.warning("Couldn't import following keys: #{Enum.join(still_missing_keys, ", ")}") end GPGex.cmd!(["--verify", checksums_path], keystore: keystore)