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

git config --global url."".insteadOf ""
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
go: module reading https://server:8081/repository/golang-proxy/ 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,

Got it working,

password SOME_PASS 
protocol https

I was using a wrong user on nexus.