fetchFromGitLab: support for private repositories

After having discovered that authentication with user name/password was added to fetchFromGitHub some months ago, I tried to implement something similar for fetchFromGitLab:

It is not ready yet, but I would appreciate feedback e.g. of other GitLab users.
I tried to make it similar to fetchFromGitHub, but the change isolated to the wip: commit is unclear to me.

Ideally, there would be a NixOS test spinning up a GitLab instance, creating users and projects, creating personal/project access tokens, configuring nix-daemon to use them, and then test to fetch from the private repos. But that is over my current capabilities. Alternatively, one may create a “private” project at gitlab.com and put the read-only access token publicly into the NixOS test.

Documentation is missing too (I added some explanations to the commit message).

1 Like