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
~/.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.
If you are trying to use this cache as a substituter,
make sure you have set netrc-file in your nix.conf.
If you are running curl yourself,
make sure you have a ~/.netrc file and use curl --netrc.
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.