From 606390af591d9b06e2976ec52db40725fba4e615 Mon Sep 17 00:00:00 2001 From: Peter Ajamian Date: Fri, 16 Jul 2021 17:31:54 +1200 Subject: [PATCH] Add -L to curl command curl won't follow redirects without -L. Since redirects are used by some who have a private repository this breaks curl in those instances. Adding -L fixes the problem. --- migrate2rocky/migrate2rocky.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate2rocky/migrate2rocky.sh b/migrate2rocky/migrate2rocky.sh index bf26ef3..273876a 100644 --- a/migrate2rocky/migrate2rocky.sh +++ b/migrate2rocky/migrate2rocky.sh @@ -884,7 +884,7 @@ establish_gpg_trust () { # extract the filename from the url, use the temp dir just created declare -g gpg_key_file="$gpg_tmp_dir/${gpg_key_url##*/}" - if ! curl -o "$gpg_key_file" --silent --show-error "$gpg_key_url"; then + if ! curl -L -o "$gpg_key_file" --silent --show-error "$gpg_key_url"; then rm -rf "$gpg_tmp_dir" exit_message "Error downloading the Rocky Linux signing key." fi