Search code examples
google-cloud-platformgcloudinitgoogle-cloud-sdk

gcloud auth login throwing error: gcloud crashed (ConnectionError): HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded


  1. gcloud builds submit failed for me yesterday.
  2. Then I tried gcloud config set project, that also failed.
  3. So I thought login might have expired so tried gcloud auth login.

In all cases, it always throws following error:

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 0x00000198B0B26970>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics

On running diagnostics as suggested, everything seems fine.

>  gcloud info --run-diagnostics
Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).

Property diagnostic detects issues that may be caused by properties.
Checking hidden properties...done.
Hidden Property Check passed.
Property diagnostic passed (1/1 checks passed).

I have also tried with my other google account, threw same error. It was working fine 1 day before. Have tried all Stackoverflow solutions, nothing seems to work.


Solution

  • This problem is with Airtel India ISP and not Google Cloud CLI. Use a VPN, and it will work.