In order to use the NixCI cache, you need to use a netrc file to authenticate using a user auth token.
Click
here
to generate a user auth token and netrc file and put it at
/home/user/.netrc
.
Once you have your netrc file, try it out using
curl
:
curl https://cache.nix-ci.com/nix-cache-info
By default,
curl
does not use the netrc file, so you should see:
Request rejected Access to this NixCI cache requires authentication. You'll need to add your credentials in your netrc file.
Now, try again with
--netrc
:
curl --netrc https://cache.nix-ci.com/nix-cache-info
You should see:
StoreDir: /nix/store WantMassQuery: 1 Priority: 0 AuthenticationRequired: 'yes' Authenticated: <your user id> ReadAllowed: <your repositories> WriteAllowed: <your user id>
If this works, you have succesfully authenticated with the NixCI cache.