I'm trying to install the cloud sdk on my system (ubuntu 20.04), and I run into some problems:
W: GPG error: https://packages.cloud.google.com/apt cloud-sdk InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05
E: The repository 'https://packages.cloud.google.com/apt cloud-sdk InRelease' is not signed.
I see that this is a common problem. I have tried the answer in the linked questions, and when I add the key I get:
OK
I also tried:
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
suggested both in the docs (which should be the best command since my system supports the --keyring
argument) and in some comments in the linked answer. Also in this case I get:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2659 100 2659 0 0 13566 0 --:--:-- --:--:-- --:--:-- 13566
OK
But it still fails when running:
sudo apt-get update
UPDATE: command list
List obtained from docs under debian/ubuntu:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg curl sudo
echo "deb [signed-by=/usr/share/keyrings/cloud.google.asc] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
- from the docs:
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update
For step 4. I tried also the supposedly equivalent from the linked SO question:
wget https://packages.cloud.google.com/apt/doc/apt-key.gpg && sudo apt-key add apt-key.gpg
--keyring
argument.sudo apt-get install apt-transport-https ca-certificates gnupg curl sudo
I get:[...] is already the newest version
for all of them. When I runcat /etc/apt/sources.list.d/google-cloud-sdk.list
I do get the echoed string. Just as a reference, I'm using the signed by version because ubuntu 20.04 supports it