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
.git
For HTTPS private gitlab repo, @Rick Smith's answer is enough. Here's a compensation for HTTP repo, first run the command:
git config --global url."git@mygitlab.com:".insteadOf "http://mygitlab.com/"
then use below go get command to get the golang project:
go get
go get -v -insecure mygitlab.com/user/repo