Use the following devenv.nix, with "private" being something you know exists but is private
{ ... }:{
cachix.pull = [ "private" ]
}
Ensure you have your CACHIX_AUTH_TOKEN in env, then devenv test:
$ devenv test
• Overriding .devenv to .devenv.iU9FZs9vRRDY
• Building tests ...
✖ Cache private does not exist or you don't have a CACHIX_AUTH_TOKEN configured.
✖ To create a cache, go to https://app.cachix.org/.
• Failed to get cachix caches due to evaluation error
error:
error: interrupted by the user
Version
On both devenv 1.0.5 (x86_64-linux) and devenv 1.0.5 (aarch64-darwin)
Describe the bug
Devenv does not seem to auth to check cache existance. https://github.com/cachix/devenv/blob/main/devenv/src/command.rs#L280 does not appear to use or pass the auth token to the API, which https://app.cachix.org/api/v1/#/default/get_api_v1_cache__name_ appears to need if it is to return a 200 for a private cache. The API endpoint does return 200 if auth'd via cookie. Manually hitting the api with
Authorization: Bearer <thetoken>
returns the correct results. I cancachix use private
just fine with the same env.To reproduce
Use the following devenv.nix, with
"private"
being something you know exists but is privateEnsure you have your
CACHIX_AUTH_TOKEN
in env, thendevenv test
:Version
On both
devenv 1.0.5 (x86_64-linux)
anddevenv 1.0.5 (aarch64-darwin)