After getting numerous errors with `go get` and much searching for answers, I stumbled across this solution.
In Gitlab add a personal access token.
In your ~/.netrc file add:
machine gitlab.com
login {{personal_access_token_name}}
password {{personal_access_token}}
Replacing the prompts with the actual values.
In your .bashrc add
export GOPRIVATE="gitlab.com/{{path_to_project}}"
In your .bashrc add
export GOPRIVATE="gitlab.com/{{path_to_project}}"
This is working for me, a similar approach may well work with bitbucket or codebasehq.