golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.72k stars 17.62k forks source link

proxy.golang.org: https://proxy.golang.org/github.com/klauspost/compress/@v/v1.13.6.zip: 403 Forbidden #50127

Closed siba36 closed 2 years ago

siba36 commented 2 years ago

What version of Go are you using (go version)?

go version go1.17.3 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Master\AppData\Local\go-build
set GOENV=C:\Users\Master\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Master\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Master\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.3
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Master\go\src\mongoAPI\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Master\AppData\Local\Temp\go-build3367626320=/tmp/go-build -gno-record-gcc-switches

What did you do?

I've tried to download mongoDB golang driver to a project in VS code running this command in the VS code terminal: go get go.mongodb.org/mongo-driver/mongo but I got a 403 forbidden error like this: go: downloading github.com/klauspost/compress v1.13.6 go.mongodb.org/mongo-driver/mongo imports github.com/klauspost/compress/zstd: github.com/klauspost/compress@v1.13.6: reading https://proxy.golang.org/github.com/klauspost/compress/@v/v1.13.6.zip: 403 Forbidden I've figured maybe my ip address is restriced so I've tried downloading it using several VPNs like psiphon and hotspot shield but I'm still getting the same error.

What did you expect to see?

go: downloading github.com/klauspost/compress v1.13.6 getting the package without any error

What did you see instead?

go: downloading github.com/klauspost/compress v1.13.6 go.mongodb.org/mongo-driver/mongo imports go.mongodb.org/mongo-driver/x/mongo/driver imports github.com/klauspost/compress/zstd: github.com/klauspost/compress@v1.13.6: reading https://proxy.golang.org/github.com/klauspost/compress/@v/v1.13.6.zip: 403 Forbidden

seankhliao commented 2 years ago

where are you/what is your IP address?

siba36 commented 2 years ago

my IP address is 192.168.15.100 @seankhliao

seankhliao commented 2 years ago

what does https://ifconfig.co/ say your ip address is?

siba36 commented 2 years ago

this is the output of running ipconfig in cmd

Ethernet adapter Ethernet:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : tishreen.com

Unknown adapter Local Area Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Local Area Connection* 10:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::a993:2c0:b720:92c6%6
   IPv4 Address. . . . . . . . . . . : 192.168.15.100
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.15.1

@seankhliao

seankhliao commented 2 years ago

Those are private network addresses, not the ones used to reach the proxy servers. Click the link I gave above and tell me that address

siba36 commented 2 years ago

this is my ip address using the link 2001:67c:2660:425:1b::125 @seankhliao

cherrymui commented 2 years ago

@siba36 is it still reproducible?

siba36 commented 2 years ago

yes I couldn't figure out the solution to this error @cherrymui

cherrymui commented 2 years ago

cc @katiehockman @heschi @hyangah

heschi commented 2 years ago

Is this a GCP host? If so you may be seeing #49144. Otherwise, please visit that URL directly and see if the page gives you any more information. You must be behind some kind of proxy or network gateway.

gopherbot commented 2 years ago

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

jamalkaksouri commented 2 years ago

How to fix it?

https://proxy.golang.org/github.com/klauspost/compress/@v/v1.13.4.zip: 403 Forbidden

I'm using go version go1.18.1 windows/amd64

Solution: I solved my problem by changing the IP address

Lavaei commented 2 years ago

I have this problem too. The IP addresses of the data center (which I have a VPN tunnel through) are blacklisted. But I don't know why? The data center is located in Germany.

heschi commented 2 years ago

If someone affected is willing to post their IP address I can try to see if there's some kind of blocking on our side that I'm not aware of.

Lavaei commented 2 years ago

@heschi My IP address is 162.55.230.234

hyangah commented 1 year ago

@Lavaei sorry for the late response. The proxy.golang.org service is available in most countries and regions. However, Google restricts access to some of its services in certain countries or regions, such as Crimea, Cuba, the so-called Donetsk People's Republic and Luhansk People's Republic, Iran, North Korea, and Syria.

Lavaei commented 1 year ago

@hyangah This IP belongs to Germany:

https://ipinfo.io/162.55.230.234

smzm commented 1 year ago

Set the environment variable GOPROXY=direct and then install it