Skip to content

fix: manage keyring files in trusted.gpg.d because apt-key is deprecated

Artyom Kartasov requested to merge install-gcloud-sdk-in-ci into master

Description

Manage keyring files in trusted.gpg.d because apt-key is deprecated

Related issue

https://gitlab.com/postgres-ai/database-lab/-/jobs/3838707087

$ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main
$ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1461  100  1461    0     0  47129      0 --:--:-- --:--:-- --:--:-- 47129
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 1

Examples

Checklist

  • MR description has been reviewed
  • MR changes are functionally tested
  • MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed & DOCS ARE ADJUSTED (reference doc, etc)
  • MR does NOT have UI changes OR there are UI changes and they have been reviewed & UX IS REVIEWED
Edited by Artyom Kartasov

Merge request reports