'gcloud auth login throwing error: gcloud crashed (ConnectionError): HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded
gcloud builds submit
failed for me yesterday.- Then I tried
gcloud config set project
, that also failed. - 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 1:[1]
This problem is with Airtel India ISP and not Google Cloud CLI. Use a VPN, and it will work.
Solution 2:[2]
The same problem happened to me and it was a proxy issue
I followed the steps to unset the proxy
gcloud config unset proxy/type
gcloud config unset proxy/address
gcloud config unset proxy/port
reference: https://cloud.google.com/sdk/gcloud/reference/config/unset
Solution 3:[3]
connect to a VPN or mac users enable Private Relay(Beta) in icloud setting
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Z3T4 Z00K |
Solution 2 | Erick84mm |
Solution 3 | Harish Ahuja |