Go proxy with self signed

Hi All,

I setup Go Proxy with self-signed and I got these,

root@xxxxxxxxxx:~repo# /usr/local/go/bin/go mod tidy
go: finding module for package golang.org/x/time/rate
go: finding module for package github.com/julienschmidt/httprouter
go: webhook imports
        github.com/julienschmidt/httprouter: module github.com/julienschmidt/httprouter: Get "https://server:8081/repository/golang-proxy/github.com/julienschmidt/httprouter/@v/list": tls: failed to verify certificate: x509: certificate signed by unknown authority
go: webhook imports
        golang.org/x/time/rate: module golang.org/x/time/rate: Get "https://server:8081/repository/golang-proxy/golang.org/x/time/rate/@v/list": tls: failed to verify certificate: x509: certificate signed by unknown authority

Didn’t get any solution how to skip ssl verify on the documentation online on Nexus Sonatype.

I did this first,

/usr/local/go/bin/go env -w GOPROXY=https://server:8081/repository/golang-proxy
/usr/local/go/bin/go env -w 'GOSUMDB=sum.golang.org https://server:8081/repository/golang-sum-proxy'	

It didn’t work.

I tried this, and it didn’t work either,

git config --global http.sslverify false
export GOPROXY=https://server:8081/repository/golang-proxy
/usr/local/go/bin/go env -w GOPROXY=https://server:8081/repository/golang-proxy
/usr/local/go/bin/go env -w 'GOSUMDB=sum.golang.org https://server:8081/repository/golang-sum-proxy'
/usr/local/go/bin/go env -w GOINSECURE="server:8081/repository/golang-proxy,server:8081/repository/golang-sum-proxy"

Please help.
Thanks,
Vener

Hey @venerayan,

if your repository uses a self signed certificate or you have your own PKI, you have to install the certificate on the client.
Here is how you can do this on Ubuntu:

Best regards!

1 Like

Many thanks! More power.