Nexus Go-proxy with authentication

Hi All,

I got answered from this forum on how to skip-ssl-verify, many thanks for that. My next task is to authenticate, the documentation say, it still not supported,

At the time of implementation of the Go repository in Sonatype Nexus Repository, the Go client does not have a means of authentication. This means Sonatype Nexus Repository instances with anonymous disabled will not be able to reach the Go endpoints, rendering proxy useless. See details on Anonymous Access.

But searching the net is giving me a private Go,

I tried those, it’s not working,

cat << 'EOF' > ~/.netrc
machine server:8081/repository/golang-proxy/ login user password glpat-xxxxxxxxxxx
EOF

git config --global url."git@gitlab.private.com:6443".insteadOf "https://gitlab.private.com:6443/"
export GOPRIVATE=server:8081/repository/golang-proxy/
/usr/local/go/bin/go env -w GOPROXY=https://server:8081/repository/golang-proxy,direct
export GONOSUMDB=*
export GOSUMDB=off

/usr/local/go/bin/go get github.com/go-pkgz/expirable-cache
go: module github.com/go-pkgz/expirable-cache: reading https://server:8081/repository/golang-proxy/github.com/go-pkgz/expirable-cache/@v/list: 401 Unauthorized

Is the private Go on Nexus will work or not at all?

Please shed some light on this?

Btw, I’m using Gitlab.

Many thanks,
Vener

Got it working,

machine nexus.some.repo.com:4443 
login SOME_LOGIN 
password SOME_PASS 
protocol https

I was using a wrong user on nexus.

Thanks.