在cherryserver上下载Go时出现问题

0qx6xfy6  于 2023-04-18  发布在  Go
关注(0)|答案(1)|浏览(130)

我已经通过terraform在cherryservers上部署了一个服务器。这是一个ubuntu服务器,我在公网IP 5.199.161.113后面。我试图在上面安装kubernetes,但在下载一些资源时遇到了麻烦。
执行中:wget https://storage.googleapis.com/golang/getgo/installer_linux由于某种原因返回403
然后我试着:

curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz 
And I get 403 as well. Here is the output : 
curl -v -OL https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 142.250.74.81:443...
* TCP_NODELAY set
* Connected to golang.org (142.250.74.81) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [15 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [10110 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [79 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=misc-sni.google.com
*  start date: Mar 20 08:22:21 2023 GMT
*  expire date: Jun 12 08:22:20 2023 GMT
*  subjectAltName: host "golang.org" matched cert's "golang.org"
*  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x5565d93edb10)
} [5 bytes data]
> GET /dl/go1.20.3.linux-amd64.tar.gz HTTP/2
> Host: golang.org
> user-agent: curl/7.68.0
> accept: */*
> 
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [282 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [282 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
} [5 bytes data]
< HTTP/2 403 
< content-type: text/html; charset=UTF-8
< referrer-policy: no-referrer
< content-length: 1609
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
< 
{ [5 bytes data]
100  1609  100  1609    0     0   5685      0 --:--:-- --:--:-- --:--:--  5705
* Connection #0 to host golang.org left intact

我在尝试时遇到了同样的问题:403.这是什么原因造成的呢?
注意 *:昨天我在cherryservers上部署了另一台服务器,没有这个问题,但是从那里开始,我部署的每台服务器都有这个问题。

相关问题