Skip to content

Instantly share code, notes, and snippets.

@MicahParks
MicahParks / go get private GitLab with group and subgroup (Golang modules).md
Last active October 28, 2025 12:42
go get private GitLab with group and subgroup (Golang modules)

Problem

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 privategitlab.company.com.

Environment variables

The following environment variables are recommended:

export GO111MODULE=on
export GOPRIVATE=privategitlab.company.com