Today I Learned — Fix: go get private repository return error reading … 410 gone

Fixing error: go get gomodule on private module with error message pattern verifying git-host… reading … 410 gone

Iman Tumorang
Sep 23, 2019 · 3 min read

Today on a bright day, Sunday Funday, but ruined by something that made me furious for an hour. Actually, I’ve stuck with this issue since last night (Saturday Night), but since I’m really tired, I decide to stop and rest and continue again on Sunday.

So, I’ve been working on Mabar ( as one of my side projects. It’s still on the beta version, still lack of many features, you can try it on Android Play Store here

I have a high expectation on this Mabar, it should be a platform, that available on many interfaces (Mobile, Desktop, Web). For the tech-stack, I use Golang as the backend, Kubernetes as the infrastructure, and Digital Ocean behind them as the Server.


So the issues is, I have a private module (Golang module), a simple library that will be imported by my backend API. But somehow, I can’t get the module and always bring errors when I do the command.

Let’s say the package name is . And it always throw error on the terminal. That really made me mad on it.

$ go get -v
go: finding latest
go: downloading v0.0.0-20190921175342-61a76c096369
verifying reading 410 Gone

If you look the message, it says the package is gone or not available in

At first, I think this happens because I forgot to enforce SSH on bitbucket, as I ever write it here:

But, it still not worked well. It still keeps returning an error when I do the commands, even I force it only using SSH.

Root Causes

So, after searching for this issue on the internet, I found the root-causes. This only happens on Golang from version 1.13. I can verify this after reading this release

So, this happened because there’s a new feature about proxy in this Golang version.


Actually there are a few solutions that we can choose.


As stated in the release doc of Go 1.13,

The new GOPRIVATE environment variable indicates module paths that are not publicly available. It serves as the default value for the lower-level GONOPROXY and GONOSUMDB variables, which provide finer-grained control over which modules are fetched via proxy and verified using the checksum database.

Means, to solve the issue above, we can just fill the variable in our system. Add this command in the . *Change the export value based on your company/org name.

export GOPRIVATE=",,"

And to verify if this worked, you can do the command. It’s should be more like this.

$ go env
GOENV="/Users/imantumorang/Library/Application Support/go/env"

And now I can do the command for my private repository.

$ go get
go: finding latest
go: downloading v0.0.0-20190921175342-61a76c096369
go: extracting v0.0.0-20190921175342-61a76c096369

So this will tell the command to use the private host proxy to retrieve the package.


Another solution, maybe using the variable. I still don’t try this, but it seems works after reading this proposal

So you can set this in your environment variable:

export GONOSUMDB=",,"

Actually this issue only happens in new Golang version 1.13 and afterward. So before updating your Golang version, make sure to set this environment variable.

Here a few links that may be related to this issue, thanks to noveaustack for finding this and posting this in Stackoverflow, I just reposted this because I just know this issue and as a new thing I learned.


Mabar — Behind The Scene and Product Related

How do we build Mabar from scratch, behind the scenes, struggle and obstacle, glory and happiness for the better Mabar and for the communities

Iman Tumorang

Written by

Software Engineer - Writer - Open Source Enthusiast - Startup Enthusiast. Reach me out in for fast response :)

Mabar — Behind The Scene and Product Related

How do we build Mabar from scratch, behind the scenes, struggle and obstacle, glory and happiness for the better Mabar and for the communities

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade