79351550

Date: 2025-01-13 08:28:41
Score: 2.5
Natty:
Report link

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
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): having the same issue
  • Me too answer (0): see the same error
  • Low reputation (1):
Posted by: tulkinbekov