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

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

  1. gcloud builds submit 昨天我失败了。
  2. 然后我试了gcloud config set project,也失败了。
  3. 所以我认为登录可能已过期,所以尝试 gcloud auth login

在所有情况下,它总是抛出以下错误:

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

按照建议进行 运行 诊断,一切似乎都很好。

>  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).

我也试过用我的另一个 google 帐户,抛出同样的错误。它在 1 天前工作正常。已尝试所有 Whosebug 解决方案,似乎没有任何效果。

此问题出在 Airtel India ISP 而不是 Google Cloud CLI。使用 VPN,它会起作用。

连接到 VPN 要么 mac 用户在 icloud 设置中启用私人中继(测试版)

我也遇到了同样的问题,是代理问题

我按照步骤取消设置代理

gcloud config unset proxy/type
gcloud config unset proxy/address
gcloud config unset proxy/port

参考:https://cloud.google.com/sdk/gcloud/reference/config/unset