错误:gcloud 崩溃(UnicodeDecodeError):'ascii'编解码器无法解码位置 3 中的字节 0xbb:序数不在范围内(128)

错误:gcloud 崩溃(UnicodeDecodeError):'ascii'编解码器无法解码位置 3 中的字节 0xbb:序数不在范围内(128)

我的环境:

$ cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
$ python --version
Python 2.7.5
$ 

我跟着Red Hat 和 Centos 快速入门 | Cloud SDK 文档 | Google Cloud现在尝试运行gcloud init,但遇到以下问题:

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

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 (SSLHandshakeError)
    Cannot reach https://accounts.google.com (SSLHandshakeError)
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:  3

Enter the proxy host address: localhost

Enter the proxy port: 1080

Is your proxy authenticated (y/N)?  n

Cloud SDK proxy properties set.

Rechecking network connection...failed.                                                                 
ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte 0xbb in position 3: ordinal not in range(128)

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
$ 

curl

$ curl -I --socks4 localhost:1080 https://www.google.com/
HTTP/1.1 200 OK
Date: Thu, 28 Feb 2019 21:25:20 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: 1P_JAR=2019-02-28-21; expires=Sat, 30-Mar-2019 21:25:20 GMT; path=/; domain=.google.com
Set-Cookie: NID=162=LuzacZMjVzgswiYwf-fPligaLv-XnApOCbSPBD5NQR_H4uNxyMXEhYcz_6snLorUQ2FnEl88khf3AfyZ2xJyHrJIUNiXRwknwWrkdvg5jkWGtnvYeaEpasNjgb_4YVPZO-65TyF4M2YzYfbMS-SUZ_q1buoQDAQYMg9WVdpmomM; expires=Fri, 30-Aug-2019 21:25:20 GMT; path=/; domain=.google.com; HttpOnly
Transfer-Encoding: chunked
Alt-Svc: quic=":443"; ma=2592000; v="44,43,39"
Accept-Ranges: none
Vary: Accept-Encoding

$ 

我还跑了gcloud info

$ gcloud info --run-diagnostics
Network diagnostic detects and fixes local network connection issues.
Checking network connection...failed.                                                                   
ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte 0xbb in position 3: ordinal not in range(128)

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 config set proxy/type socks4
Updated property [proxy/type].
$ gcloud config set proxy/address localhost
Updated property [proxy/address].
$ gcloud config set proxy/port 1080
Updated property [proxy/port].
$ 
$  gcloud version
Google Cloud SDK 280.0.0
alpha 2020.02.07
beta 2020.02.07
bq 2.0.53
core 2020.02.07
gsutil 4.47
kubectl 2020.02.07
$ 

相关内容