zlacker

[parent] [thread] 1 comments
1. Tohsig+(OP)[view] [source] 2025-08-22 14:41:34
Definitely not just you. At my previous job we had a need to fetch private Go modules from Gitlab and, later, a self-hosted instance of Forgejo. CTO and I spent a full day or so doing trial and error to get a clean solution. If I recall correctly, we ultimately resorted to each developer adding `GOPRIVATE={module_namespace}` to their environment and adding the following to their `.netrc`:

``` machine {server} # e.g. gitlab.com login {username} password {read_only_api_key} # Must be actual key and not an ENV var ```

Worked consistently, but not a solution we were thrilled with.

replies(1): >>Tohsig+Qo5
2. Tohsig+Qo5[view] [source] 2025-08-24 17:29:36
>>Tohsig+(OP)
Fixing my formatting in case this proves useful to anyone:

  machine {server} # e.g. gitlab.com
  login {username}
  password {read_only_api_key} # Must be actual key and not an ENV var
[go to top]