-2

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:

  1. sudo apt-get update
  2. sudo apt-get install apt-transport-https ca-certificates gnupg curl sudo
  3. 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
  4. 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 -
  5. 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

2
  • As you have also shared the official document for Cloud SDK installation , please check if you have followed the steps which are linked specifically to systems which support --keyring argument. Commented Nov 3, 2023 at 14:07
  • yes. When I run 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 run cat /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 Commented Nov 3, 2023 at 14:12

1 Answer 1

2

I have recreated your issue with the steps you shared and got the exact error message

image

Even I tried with the suggestion wget https://packages.cloud.google.com/apt/doc/apt-key.gpg && sudo apt-key add apt-key.gpg but still the same issue

image

This might be a bug in cloud sdk.I suggest you raise a bug report in the public issue tracker so that it will bring attention to the engineering team and be resolved soon.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.