I have been having the same issue with private gitlab repository
Answer by @Abstulo
works fine with public repositories. Just want to add info about importing private repo.
If the gitlab repo is private (or protected), got mod tidy
command may not be able to import due to secure connection issues.
If you see the same error message:
no secure protocol found for repository
SOLUTION (after replacing the .git
).
git config --global --add url.https://USERNAME:[email protected] https://gitlab.company.com
GOPRIVATE=gitlab.company.com go get gitlab.company.com/AAA/BBB/CCC/repo-name@TAG