From e0e8110ada924468b9512b660acc8c5ebd4742d7 Mon Sep 17 00:00:00 2001 From: Dirk Elmendorf Date: Sat, 11 Nov 2023 06:38:06 -0600 Subject: [PATCH 1/3] Remove apt-key directions Update install.sh - remove use of apt-key (apt-key is deprecated) [https://manpages.debian.org/testing/apt/apt-key.8.en.html#:~:text=DESCRIPTION,keys%20from%20the%20main%20keyring.] The preferred solution now is to download the key and attach it to the line in the apt sources file. This eliminates the following message when you update packages: W: https://gitsecret.jfrog.io/artifactory/git-secret-deb/dists/git-secret/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. This follows the new guidelines. (Digital Ocean)[https://www.digitalocean.com/community/tutorials/how-to-handle-apt-key-and-add-apt-repository-deprecation-using-gpg-to-add-external-repositories-on-ubuntu-22-04] This is based on example from (Helm)[https://helm.sh/docs/intro/install/] --- utils/deb/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/deb/install.sh b/utils/deb/install.sh index de92b0d53..29c87d20a 100644 --- a/utils/deb/install.sh +++ b/utils/deb/install.sh @@ -1,5 +1,7 @@ -sudo sh -c "echo 'deb https://gitsecret.jfrog.io/artifactory/git-secret-deb git-secret main' >> /etc/apt/sources.list" -wget -qO - 'https://gitsecret.jfrog.io/artifactory/api/gpg/key/public' | sudo apt-key add - +wget -qO - 'https://gitsecret.jfrog.io/artifactory/api/gpg/key/public' | gpg --dearmor | sudo tee /usr/share/keyrings/git-secret.gpg > /dev/null +sudo apt-get install apt-transport-https ca-certificates --yes +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/git-secret.gpg] https://gitsecret.jfrog.io/artifactory/git-secret-deb git-secret main" | sudo tee /etc/apt/sources.list.d/git-secret.list +sudo apt-get update && sudo apt-get install -y git-secret sudo apt-get update && sudo apt-get install -y git-secret # Testing, that it worked: From d8c9b223c951a2f645ee5b2ba7782489e73e7b13 Mon Sep 17 00:00:00 2001 From: Dirk Elmendorf Date: Sat, 11 Nov 2023 06:39:12 -0600 Subject: [PATCH 2/3] Extra Line Removing line that was duplicated. --- utils/deb/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/deb/install.sh b/utils/deb/install.sh index 29c87d20a..fc1e5151c 100644 --- a/utils/deb/install.sh +++ b/utils/deb/install.sh @@ -2,7 +2,7 @@ wget -qO - 'https://gitsecret.jfrog.io/artifactory/api/gpg/key/public' | gpg --d sudo apt-get install apt-transport-https ca-certificates --yes echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/git-secret.gpg] https://gitsecret.jfrog.io/artifactory/git-secret-deb git-secret main" | sudo tee /etc/apt/sources.list.d/git-secret.list sudo apt-get update && sudo apt-get install -y git-secret -sudo apt-get update && sudo apt-get install -y git-secret + # Testing, that it worked: git secret --version From 912f3b14d8270f0b336d58830eae6ece7b469897 Mon Sep 17 00:00:00 2001 From: Dirk Elmendorf Date: Sat, 11 Nov 2023 06:40:40 -0600 Subject: [PATCH 3/3] Update CHANGELOG.md Added in a note to the changelong --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25d5d46c1..8c5c10d44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Fix `clean`, `hide`, `reveal` so they only remove marked secret files (#833) - Fix for `removeperson` if same email is present multiple times (#638) - Correct error message about files missing from .gitignore +- Updated installation instructions for Debian/Ubuntu to remove deprecated apt-key ### Misc