目前我正在使用Cloud Build来生成一些我需要部署到 GCE 实例的工件。为此,我尝试使用带有以下参数的gcloud builder:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['compute', 'scp', '--zone=<zone_id>', '<local_path>', '<google compute engine instance name>:<instance_path>']
并且构建失败并出现以下错误:
ERROR: (gcloud.compute.scp) Could not SSH into the instance. It is
possible that your SSH key has not propagated to the instance yet. Try
running this command again. If you still cannot connect, verify that
the firewall and instance are set to accept ssh traffic.
我已经在我的实例上打开了端口22,但这对我没有帮助。
你们能帮我解决这个问题吗?
我需要在构建定义中检查/修复哪些要点?
也许你能给我一个建议,我可以使用哪个构建器而不是gcloud将我的数据从Cloud Build容器传递到GCE实例?