Google cloud platform 启动脚本yum-install失败,返回“0”;无法验证google cloud sdk的签名”;

Google cloud platform 启动脚本yum-install失败,返回“0”;无法验证google cloud sdk的签名”;,google-cloud-platform,google-compute-engine,Google Cloud Platform,Google Compute Engine,我使用以下命令重新运行启动脚本: sudo google\u metadata\u script\u runner——脚本类型启动 所有yum install命令都失败,出现以下错误: startup-script: INFO startup-script-url: Retrieving key from https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg startup-script: INFO startup-scrip

我使用以下命令重新运行启动脚本:
sudo google\u metadata\u script\u runner——脚本类型启动

所有
yum install
命令都失败,出现以下错误:

startup-script: INFO startup-script-url: Retrieving key from https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
startup-script: INFO startup-script-url: https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for google-cloud-sdk
startup-script: INFO startup-script-url: Trying other mirror.
startup-script: INFO startup-script-url:  One of the configured repositories failed (Google Cloud SDK),

你知道我如何在实例设置或其他解决方法时解决这个问题吗?

老实说,我在谷歌上找到了这个,不确定这是否有帮助,但也许你可以试试

1) 在yum-config
/etc/yum.conf
中禁用缓存:

http\u caching=none

2) 删除tmp yum文件:
rm-r/var/tmp/yum*

3) 重新启动机器

4) 清除yum命令:

yum clean metadata  
yum clean all  
yum update  

我正试图在我这边重现这个问题。如果您能分享以下信息,将非常有帮助:

  • 您在这里使用的确切操作系统是什么

  • 当您尝试在VM启动后手动运行脚本时会发生什么

  • 请在没有机密信息或凭据的情况下共享示例脚本


  • 虽然我还没有对此进行测试,但由于yum没有足够的缓存数据来继续,可能会发生错误。可以在公共网站上找到解决方案:

    正确使用列表显示您的答案。