gcloud auth登录抛出错误:gcloud崩溃(ConnectionError):HTTPSConnectionPool(host ='oauth2.googleapis.com',port = 443):超出最大重试次数

Vic*_*das 3 init google-cloud-platform gcloud google-cloud-sdk

  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
Run Code Online (Sandbox Code Playgroud)

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

>  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).
Run Code Online (Sandbox Code Playgroud)

我也尝试过使用我的其他谷歌帐户,引发了同样的错误。1天前还运行良好。尝试了所有 Stackoverflow 解决方案,似乎都不起作用。

小智 11

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

  • 你是怎么想到这一点的? (2认同)

小智 5

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

我按照以下步骤取消代理设置

gcloud config unset proxy/type
gcloud config unset proxy/address
gcloud config unset proxy/port
Run Code Online (Sandbox Code Playgroud)

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