Gcloud compute ssh not working

I am using Windows Server 2008.

when issuing gcloud compute ssh instance-1 - zone us-central1-a I get an error:

ERROR: (gcloud.compute.ssh) Could not fetch instance:
 - Invalid value 'EFOnline'. Values must match the following regular expression: '(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-
a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))'

To be clear, I registered gcloud auth and got a successful “you are now authenticated”, my project name is EFOnline my instance name is: instance-1 us-central1-a (cut and paste there)

So why is the weird regular expression error? Thanks

+4
source share
3 answers

Google Cloud Projects have both a name and an identifier.

- , Google. URI "" URI. "" http://console.developers.google.com/.

- , , , , .

GCloud ( GCP) .

... : : http://console.developers.google.com/,

$ gcloud config set project <id>
$ gcloud compute ssh instance-1 --zone us-central1-a

, .

+8

, Google , Google:

gcloud auth login

, , SSH Google gcloud.

+6

Alternatively, you can log in to your developer's console, open a virtual machine instance, and click on the SSH widget at the top of the page by selecting the "View Gcloud" command. This will create your specific terminal string.

gcloud compute --project "project_name" ssh --zone "us-central1-a" "vm_instance_name"

-1
source

All Articles