install google-cloud-sdk on ec2 public key issue

700 views
Skip to first unread message

Stefano Giostra

unread,
Nov 3, 2020, 12:36:14 PM11/3/20
to Google Cloud Developers
I'm trying to install google-cloud-sdk on AWS EC2 and i got this error:
Public key for ******************-google-cloud-sdk-316.0.0-1.x86_64.rpm is not installed  
How can I resolve this issue?

Chris Gerber

unread,
Nov 3, 2020, 12:54:19 PM11/3/20
to Stefano Giostra, Google Cloud Developers
Have you updated YUM with the Cloud SDK repository information, per http://cloud.google.com/sdk/docs/install#rpm?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-dev/2beefdc0-18a2-4a5f-a02a-d061d7138da2n%40googlegroups.com.
Message has been deleted

Stefano Giostra

unread,
Nov 4, 2020, 4:57:05 AM11/4/20
to Google Cloud Developers
Hi Chris,
yes,  as first step I'd updated YUM with Cloud SDK repo information as reported on GCP official doc  

Chris Gerber

unread,
Nov 4, 2020, 9:18:53 AM11/4/20
to Stefano Giostra, Google Cloud Developers
Thanks for confirming that, Stefano.

We'll need more details to help diagnose this further. Can you provide the steps needed to reproduce this, including:
  • Which publicly available AMI can this be reproduced on?
  • What exact series of commands are you running?
  • What is the full error message you receive?
Thanks!

Stefano Giostra

unread,
Nov 4, 2020, 11:41:07 AM11/4/20
to Google Cloud Developers
Hi Chris,
> Which publicly available AMI can this be reproduced on?
The ec2 is a Amazon Linux 2 AMI t2.micro on eu-west-3b  

> What exact series of commands are you running?
The user that I use is the default user ec2-user
the first command is that showned on the doc  GCP official doc  and in fact i have the google-cloud-sdk.repo file:

[ec2-user@ip-************** ~]$ more /etc/yum.repos.d/google-cloud-sdk.repo
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

But when I try to execute: sudo yum install google-cloud-sdk
I got:
Public key for a0ec474c4365b41f77edda7f0340b841dbf64e6b32ee6f5e099c907cb5d62108-google-cloud-sdk-317.0.0-1.x86_64.rpm is not installed


 Failing package is: google-cloud-sdk-317.0.0-1.x86_64

I tryed also to download and install the 2 gpg files but this has not changed the result:
gpg --import gcp-sdk.gpg 
gpg --import gcp-sdk-rpm-package-key.gpg

[ec2-user@ip-********** ~]$ gpg --list-keys
/home/ec2-user/.gnupg/pubring.gpg
---------------------------------
pub   2048R/BA07F4FB 2018-04-01 [expires: 2021-03-31]
uid                  Google Cloud Packages Automatic Signing Key <gc-...@google.com>

pub   2048R/3E1BA8D5 2015-06-24
uid                  Google Cloud Packages RPM Signing Key <gc-...@google.com



Thanks
Stefano G. 

Chris Gerber

unread,
Nov 9, 2020, 3:52:09 PM11/9/20
to Stefano Giostra, Google Cloud Developers
Thank you for providing your region and instance size, but I also need the AMI. It should be similar to "ami-0947d2ba12ee1ff75", which happens to be the AMI for "Amazon Linux 2 AMI (HVM), SSD Volume Type".

Also, apologies for my slow replies. I do not have an Amazon account at work, so I can only try to reproduce this from my personal account.

Chris Gerber

unread,
Nov 11, 2020, 9:13:16 PM11/11/20
to Stefano Giostra, Google Cloud Developers
I cannot reproduce the problem. 

I had trouble finding the same AMI, so I used "Amazon Linux 2 AMI 2.0.20201028" (ami-09bee01cc997a78a6). I then SSHed into it, ran the first two commands at https://cloud.google.com/sdk/docs/install#rpm, and answered 'y' at every prompt.

I can now successfully run gcloud 318.0.0 without issue. 


On Tue, Nov 10, 2020, 3:21 AM Stefano Giostra <sgio...@bitbang.com> wrote:

Hi Chris,

the AMI_ID is: ami-0de12f76efe134f2f

Description: Amazon Linux 2 AMI 2.0.20200917.0 x86_64 HVM gp2

 

Da: Chris Gerber <ge...@google.com>
Inviato: lunedì 9 novembre 2020 21:51
A: Stefano Giostra <sgio...@bitbang.com>
Cc: Google Cloud Developers <google-c...@googlegroups.com>
Oggetto: Re: [google-cloud-dev] install google-cloud-sdk on ec2 public key issue

Stefano Giostra

unread,
Nov 12, 2020, 11:19:56 AM11/12/20
to Chris Gerber, Google Cloud Developers

Hi Chris,

I tried again with a new ec2,

 

AMI Name:       amzn2-ami-hvm-2.0.20200917.0-x86_64-gp2

Source:         amazon/amzn2-ami-hvm-2.0.20200917.0-x86_64-gp2

Status:         available

Creation date:  September 22, 2020 at 4:10:08 AM UTC+2

Platform details: Linux/UNIX

Architecture:   x86_64

Usage operation: RunInstances

Image Type:     machine

Virtualization type: hvm

Description:    Amazon Linux 2 AMI 2.0.20200917.0 x86_64 HVM gp2

Root Device Name:   /dev/xvda

Root Device Type:   ebs

 

and I made only the 2 commands of the doc, but I gotten the same error. If for You this work, I can’t understand where is the error!

 

[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ more /etc/yum.repos.d/google-cloud-sdk.repo

[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo yum install google-cloud-sdk

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd

Resolving Dependencies

--> Running transaction check

---> Package google-cloud-sdk.x86_64 0:318.0.0-1 will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

=============================================================================================================================================================================

Package                                      Arch                               Version                                  Repository                                    Size

=============================================================================================================================================================================

Installing:

google-cloud-sdk                             x86_64                             318.0.0-1                                google-cloud-sdk                              72 M

 

Transaction Summary

=============================================================================================================================================================================

Install  1 Package

 

Total size: 72 M

Installed size: 360 M

Is this ok [y/d/N]: y

Downloading packages:

warning: /var/cache/yum/x86_64/2/google-cloud-sdk/packages/cf821accd858a6e10df2ca28b4b01bd83cc2517ad604b76dcfcc40d2b04d0360-google-cloud-sdk-318.0.0-1.x86_64.rpm: Header V4

RSA/SHA1 Signature, key ID 3e1ba8d5: NOKEY

Retrieving key from https://packages.cloud.google.com/yum/doc/yum-key.gpg

Importing GPG key 0xA7317B0F:

Userid     : "Google Cloud Packages Automatic Signing Key <gc-...@google.com>"

Fingerprint: d0bc 747f d8ca f711 7500 d6fa 3746 c208 a731 7b0f

From       : https://packages.cloud.google.com/yum/doc/yum-key.gpg

Is this ok [y/N]: y

 

 

Public key for cf821accd858a6e10df2ca28b4b01bd83cc2517ad604b76dcfcc40d2b04d0360-google-cloud-sdk-318.0.0-1.x86_64.rpm is not installed

 

 

Failing package is: google-cloud-sdk-318.0.0-1.x86_64

Da: Chris Gerber <ge...@google.com>
Inviato: giovedì 12 novembre 2020 03:13

Reply all
Reply to author
Forward
0 new messages