Raspberry pi gcloud组件存储库添加错误

Raspberry pi gcloud组件存储库添加错误,raspberry-pi,google-cloud-iot,Raspberry Pi,Google Cloud Iot,我放弃了这个教程 将我的Pi连接到google cloud iot core,但当我尝试使用此命令添加存储库时 sudo gcloud组件存储库添加https://storage.googleapis.com/cloud-iot-gcloud/components-2.json 我得到了这个消息:错误:(gcloud.components.repositories.add)帐户[tiosahelal@gmail.com]没有安装此组件的权限。 但是当我跳过教程的这一部分时,我可以在googl

我放弃了这个教程

将我的Pi连接到google cloud iot core,但当我尝试使用此命令添加存储库时

sudo gcloud组件存储库添加https://storage.googleapis.com/cloud-iot-gcloud/components-2.json

我得到了这个消息:
错误:(gcloud.components.repositories.add)帐户[tiosahelal@gmail.com]没有安装此组件的权限。

但是当我跳过教程的这一部分时,我可以在google cloud iot中制作新设备,但是当我使用本教程进行测试时

我得到:
('on_connect','5:连接被拒绝')

('on_disconnect','5:连接被拒绝。')

您不再需要在Google Cloud IoT Core中使用alpha组件,因为这些组件显示在测试版中

例如:

gcloud beta iot registries list --region=us-central1
对于连接被拒绝的问题,请确保仔细检查以下所有内容:

  • 用户名被忽略
  • mqtt.googleapis.com是主机,端口8883或443(可能尝试443?)
  • 客户端ID为:
    projects/{project ID}/locations/{cloud region}/registries/{registry ID}/devices/{device ID}
如果任何配置不正确,您将无法连接。此外,请确保将设备添加到设备注册表时使用的设备证书未过期