The go
command line tool needs to be able to fetch dependencies from your private GitLab, but authenticaiton is required.
This assumes your private GitLab is hosted at gitlab.com/my-organization
, and that you are using GO version >=1.17
.
The following environment variables are recommended:
export GOPRIVATE=gitlab.com/my-organization