gpt4 book ai didi

proxy - 当我在浏览器中访问谷歌或谷歌应用引擎等网站时,谷歌云 SDK 中的网络连接问题

转载 作者:行者123 更新时间:2023-12-04 11:13:42 24 4
gpt4 key购买 nike

我在 Google App Engine 上创建了一个帐户,然后通过 gcloud init 安装了 google-cloud-sdk,并收到以下错误:

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

Your current configuration has been set to: [a]

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 (ResponseNotReady)
Cannot reach https://accounts.google.com (ResponseNotReady)
Cannot reach
https://cloudresourcemanager.googleapis.com/v1beta1/projects
(ResponseNotReady)
Cannot reach https://www.googleapis.com/auth/cloud-platform
(ResponseNotReady)
Network connection problems may be due to proxy or firewall settings.

Do you have a network proxy you would like to set in gcloud (Y/n)? Y

Select the proxy type:
[1] HTTP
[2] HTTP_NO_TUNNEL
[3] SOCKS4
[4] SOCKS5
Please enter your numeric choice: 1

Enter the proxy host address: XXX

Enter the proxy port: XXX

Is your proxy authenticated (y/N)? n

Cloud SDK proxy properties set.

Rechecking network connection...done.
ERROR: Reachability Check still does not pass.
Cannot reach https://www.google.com (ResponseNotReady)
Cannot reach https://accounts.google.com (ResponseNotReady)
Cannot reach
https://cloudresourcemanager.googleapis.com/v1beta1/projects
(ResponseNotReady)
Cannot reach https://www.googleapis.com/auth/cloud-platform
(ResponseNotReady)
Cannot reach
https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json
(ResponseNotReady)

Current effective Cloud SDK network proxy settings:
type = http
host = XXX
port = XXX
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
Please enter your numeric choice:

我在中国,但我可以在浏览器中使用代理(在 shadowsocks2.3 中设置)解锁谷歌或谷歌应用引擎等网站。我尝试在google cloud SDK中设置网络代理,IP地址和端口与shadowsocks2.3中使用的完全一致,但还是不行。并且无法访问我的项目列表。确切的问题是什么?提示或解释都表示赞赏。提前谢谢了!

最佳答案

您需要配置 gcloud cli 工具以使用代理。

https://cloud.google.com/sdk/docs/proxy-settings

就我而言,我使用 shadow-socks 作为代理,所以我做了:

gcloud config set proxy/type socks5
gcloud config set proxy/address 127.0.0.1
gcloud config set proxy/port 1086


它有效。

关于proxy - 当我在浏览器中访问谷歌或谷歌应用引擎等网站时,谷歌云 SDK 中的网络连接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49595789/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com