Proxy gcloud登录网络连接失败问题

Proxy gcloud登录网络连接失败问题,proxy,gcloud,google-cloud-sdk,Proxy,Gcloud,Google Cloud Sdk,我尝试将gcloud连接到gcloud init。我发现网络连接错误 我试着去解决这个问题 但这对我来说仍然不起作用 我的日志是: Welcome! This command will take you through the configuration of gcloud. Settings from your current configuration [default] are: core: disable_usage_reporting: 'False' proxy: addr

我尝试将gcloud连接到
gcloud init
。我发现网络连接错误

我试着去解决这个问题

但这对我来说仍然不起作用

我的日志是:

Welcome! This command will take you through the configuration of gcloud.

Settings from your current configuration [default] are:
core:
  disable_usage_reporting: 'False'
proxy:
  address: 127.0.0.1
  port: '1080'
  type: socks5

Pick configuration to use:
 [1] Re-initialize this configuration [default] with new settings 
 [2] Create a new configuration
 [3] Switch to and re-initialize existing configuration: [cindy]
Please enter your numeric choice:  1

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.                                                                                                                                        
ERROR: Reachability Check failed.
    Cannot reach https://www.google.com (error)
    Cannot reach https://accounts.google.com (error)
    Cannot reach https://cloudresourcemanager.googleapis.com/v1beta1/projects (error)
    Cannot reach https://www.googleapis.com/auth/cloud-platform (error)
    Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (error)
Network connection problems may be due to proxy or firewall settings.

Current effective Cloud SDK network proxy settings:
    type = socks5
    host = 127.0.0.1
    port = 1080
    username = None
    password = None

What would you like to do?
 [1] Change Cloud SDK network proxy properties
 [2] Clear all gcloud proxy properties
 [3] Exit

考虑到这个错误,主要是错误的以下部分,您似乎面临着代理和防火墙设置和配置方面的问题

网络连接问题可能是由于代理或防火墙设置造成的

由于此错误,您需要将SDK配置为与代理和防火墙一起使用。我建议您查看一下文档,以获得更多关于如何实现它的信息和步骤,并避免您所面临的错误

除此之外,我还可以从社区中找到以下两篇帖子,这些帖子都是你面临的类似案例的用户


如果这些信息对你有帮助,请告诉我

这是由于从goolge帐户重定向到localhost以获取令牌尝试使用firefox登录

您是否安装了代理|在localhost上运行?如果没有,安装代理或VPN应该是您的第一步。您需要到达您的机器可以到达的点,例如google.com.Hello,非常感谢。我已经将配置设置为127.0.0.1/8080/sock5,但仍然无法
gcloud init
。我还尝试了
gcloud init--dns 8.8.8.8
结果将是(gcloud.init)无法识别的参数:--dnsHi@cindywmiao检查此页面,您的
端口=1080
似乎需要像
端口=`1080`
那样配置。你能试试吗?除此之外,进一步阅读,你所面临的错误似乎有一些可能性。这对社区有一些额外的解决方案,我建议你看看。
Welcome! This command will take you through the configuration of gcloud.

Settings from your current configuration [default] are:
core:
  disable_usage_reporting: 'False'
proxy:
  address: 127.0.0.1
  port: '1080'
  type: socks5

Pick configuration to use:
 [1] Re-initialize this configuration [default] with new settings 
 [2] Create a new configuration
 [3] Switch to and re-initialize existing configuration: [cindy]
Please enter your numeric choice:  1

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.                                                                                                                                        
ERROR: Reachability Check failed.
    Cannot reach https://www.google.com (error)
    Cannot reach https://accounts.google.com (error)
    Cannot reach https://cloudresourcemanager.googleapis.com/v1beta1/projects (error)
    Cannot reach https://www.googleapis.com/auth/cloud-platform (error)
    Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (error)
Network connection problems may be due to proxy or firewall settings.

Current effective Cloud SDK network proxy settings:
    type = socks5
    host = 127.0.0.1
    port = 1080
    username = None
    password = None

What would you like to do?
 [1] Change Cloud SDK network proxy properties
 [2] Clear all gcloud proxy properties
 [3] Exit