gcloud init ERROR: gcloud crashed (ConnectionError)

Viewed 4458
  1. Google Cloud SDK installer is downloaded successfully.

  2. After successful installation, it runs gcloud init command

  3. It asked for sign-in

  4. After providing signing in details, the following error occurs

    ERROR: gcloud crashed (ConnectionError): HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded with url: /token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000016A45426A08>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

How to handle this error?

4 Answers

I was trying gcloud init on a remote desktop, and received this error: gcloud crashed (ConnectionError)

The following solution worked for me.

I used the command gcloud init --console-only instead of gcloud init

Google will eventually block your IP when you exceed a certain amount of requests. You can try to create another superuser form command line may be it will resolve the issue.

When i was trying with broadband it was giving same error, but when i switched to mobile data, everything is working fine for me.

SSL verification fails mostly if you are behind proxy. You can disable ssl auth for gcloud client using below cmd:

gcloud config set auth/disable_ssl_validation True
Related