
If you run the googlecompute Packer builder locally on your workstation, you will Running the googlecompute Packer builder on Google Cloud with aĪccount. Authenticating with Google Cloud services requires either a User Application Default Credentials,Ī JSON Service Account Key or an Access Token. mand_.CommandError: exited with return code. Raise CommandError(args, return_code=status) įile "/Users/sahil/gcloud/google-cloud-sdk/lib/surface/compute/ssh.py", line 306, in Runįorce_connect=_force_connect.GetBool())įile "/Users/sahil/gcloud/google-cloud-sdk/lib/googlecloudsdk/command_lib/util/ssh/ssh.py", line 1313, in Run Googlecloudsdk.api_tunnel_websocket.ConnectionCreationError: Error while connecting Operation not permitted].ĭEBUG: () exited with return code. Store.LoadIfEnabled(use_google_auth=True)))įile "/Users/sahil/gcloud/google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/iap_tunnel.py", line 466, in _InitiateWebSocketConnectionįile "/Users/sahil/gcloud/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/iap_tunnel_websocket.py", line 132, in InitiateConnectionįile "/Users/sahil/gcloud/google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/iap_tunnel_websocket.py", line 350, in _WaitForOpenOrRaiseError Self._RunReceiveLocalData(_StdinSocket(), 'stdin')įile "/Users/sahil/gcloud/google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/iap_tunnel.py", line 498, in _RunReceiveLocalData

Resources = calliope_command.Run(cli=self, args=args)įile "/Users/sahil/gcloud/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 809, in Runįile "/Users/sahil/gcloud/google-cloud-sdk/lib/surface/compute/start_iap_tunnel.py", line 129, in Runįile "/Users/sahil/gcloud/google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/iap_tunnel.py", line 633, in Run ĭEBUG: (-iap-tunnel) Error while connecting Operation not permitted].įile "/Users/sahil/gcloud/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 982, in Execute

Sock = _open_socket(addrinfo_list, options.sockopt, options.timeout)įile "/Users/sahil/gcloud/google-cloud-sdk/lib/third_party/websocket/_http.py", line 189, in _open_socketįile "/Users/sahil/gcloud/google-cloud-sdk/lib/third_party/websocket/_http.py", line 172, in _open_socket INFO: Connecting with URL ĭEBUG: Error during WebSocket processing.įile "/Users/sahil/gcloud/google-cloud-sdk/lib/third_party/websocket/_app.py", line 254, in run_foreverįile "/Users/sahil/gcloud/google-cloud-sdk/lib/third_party/websocket/_core.py", line 223, in connectįile "/Users/sahil/gcloud/google-cloud-sdk/lib/third_party/websocket/_http.py", line 120, in connect ĭEBUG: Starting new HTTPS connection (1): :443 INFO: Using OS Login user instead of default user ĭEBUG: SSH Known Hosts File could not be opened: Unable to read file : No such file or directory: '/Users/sahil/.ssh/google_compute_known_hosts'ĭEBUG: Running command ĭEBUG: Loaded Command Group: ĭEBUG: credentials type for _GetAccessTokenCallback is. Although I am not sure about it: gcloud compute ssh -verbosity=debug instance-nameĭEBUG: Running with arguments: ĭEBUG: Starting new HTTPS connection (1): :443ĭEBUG: "POST /batch/compute/v1 HTTP/1.1" 200 NoneĮxternal IP address was not found defaulting to using IAP tunneling.ĭEBUG: Starting new HTTPS connection (1): :443 Maybe my laptop's firewall settings are prohibitting it. I believe there could be something wrong with my cloud sdk setup but I am not sure.Įdit: I tried executing the command with verbosity: gcloud compute ssh -verbosity=debug instance-nameĪnd looking at the output, I think something might be wrong with my web socket. Also one of my colleagues is also able to ssh using cloud sdk from his mac. So I think IAP tunneling is setup correctly. Strangely, I am able to ssh into the instance using cloud shell. Kex_exchange_identification: Connection closed by remote hostĮRROR: () exited with return code. External IP address was not found defaulting to using IAP tunneling.ĮRROR: (-iap-tunnel) Error while connecting Operation not permitted]. Here is the output that I am getting on executing that command.

gcloud compute ssh I am getting an error.
#Gcloud ssh tunnel to instance mac
I've installed GCP's cloud SDK on Mac and I have owner's role and I am trying to ssh into one of the compute engine instances using this command.
