GitLab is a free, open-source way to host private .git repositories but it does not seem to work with Go. When you create a project it generates a URL of the fo
GitLab version 11.8+ and Go version 1.13+ will work with BASIC auth by using your GitLab personal token. Go to Settings -> Access Tokens in your Gitlab, add a personal access token or use your existing one. In your ~/.netrc file, add following lines:
machine (e.g. gitlab.com)
login
password
Then you should be able to do go get locally.
If you need to build it in CI, then add following line in your .gitlab-ci.yml file:
before_script:
- echo -e "machine \nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc