Go support

Hi Team,

Is there a plan to support go hosted and proxy with IQ integration ? If not, do you have any suggestions/alternatives we may use so that when we go “go get” we dont go to github,com and instead visit nexus url… if we use raw hosted repository and host these packages, will the “go get” work. something like “go get https://nexus/raw-repo/go/gocov” ?

Thank you for your time.


This is currently a bit hard to achieve with the way Golang works, specifically in the go get tool chain. Tools like dep or vgo will likely solve this, but the short of it is, most Golang dependencies are obtained via getting git repositories, and that is a deviation from most formats, which obtain dependencies by either obtaining a versioned jar, zip, tgz, etc… Using raw, I don’t know how you’d do this, in theory it might be possible if all traffic is happening via https and not ssh, and I would imagine setting a proxy value for go get to use.

I’ve been working with some of the vgo prototype stuff, and created a really small POC here: GitHub - sonatype-nexus-community/nexus-repository-vgo: Experimental repo for a vgo proxy and maybe more but it’s far from functional. As Golang begins to migrate their community towards allowing versioned dependencies via a package and not a git repository, I’ll make more progress on that repo, but it’s not quite there yet.


Thank you for your inputs…keep us updated as you make progress…


I’ve made some more progress on this:

If you test the DoodleWithGoogleVgo branch (there are instructions on how to do this). Let me know how it goes!

I don’t know about vgo, I am pretty new to Go.
Seems Glide is being used with Go on the few projects I have seen. A first feature could be to provide Glide Proxy in Sonatype Nexus.

We just released a new guide on Go Dependencies for Nexus Repository. Check it out here: Go Dependencies in Nexus Repository - Sonatype Guides

1 Like

@dwallace How to host private packages/modules with Nexus?
Things tried:
I have created an Athens server with GONOSUMDB env for private packages. Setup GOPROXY to nexus. It throws 404 error
If GOPROXY set to Athens, I am able to go get with GONOSUMDB exported
But trying out the same with Nexus doesn’t work