7 ms·
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
by Tohsig 1y ago
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.
- Tohsig 1y agoFixing 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