disintegration / imaging

Imaging is a simple image processing package for Go
MIT License
5.28k stars 440 forks source link

error with go get : certificate x509 issue #111

Closed allamand closed 4 years ago

allamand commented 4 years ago

Hi,

I'm trying to install the librairie but I've got a certificate error

go get -u github.com/disintegration/imaging  
go: github.com/disintegration/imaging@v1.5.0: Get https://proxy.golang.org/github.com/disintegration/imaging/@v/v1.5.0.mod: x509: certificate is valid for chalupa-dns-sinkhole.corp.amazon.com, not proxy.golang.org

any hint on this ?

thanks

disintegration commented 4 years ago

Hi,

I'm not sure, but it looks like something in your network sends a fake response when go get is trying to reach proxy.golang.org.

Could you please open the same url using a browser (https://proxy.golang.org/github.com/disintegration/imaging/@v/v1.5.0.mod)? Do you get a certificate-related warning?

allamand commented 4 years ago

Hi,

Thanks for replying, you're right, when geting this from outside of my corporate network I have no problem, but from inside they must have implemented some kind of cache proxy which get this errors.

jaypipes commented 4 years ago

Thanks for replying, you're right, when geting this from outside of my corporate network I have no problem, but from inside they must have implemented some kind of cache proxy which get this errors.

Fellow Amazonian here, ran into the same issue. For those finding this, here's the solution so you can run go mod when on Amazon's VPN:

go env -w GO111MODULE=on
go env -w GOPROXY="https://goproxy.io,direct"

# Set environment variable allow bypassing the proxy for selected modules (optional)
go env -w GOPRIVATE="*.corp.amazon.com"

https://goproxy.io/