This is a weird one.
When I try to run nix flake update nixpkgs
I get the following error:
$ nix flake update nixpkgs
warning: error: unable to download 'https://api.github.com/repos/nixos/nixpkgs/commits/nixos-unstable-small': Failed to open/read local data from file/application (26); retrying in 339 ms
warning: error: unable to download 'https://github.com/nixos/nixpkgs/archive/6c33d760f16f52ffc0dd8538b9239808d96ec699.tar.gz': Failed to open/read local data from file/application (26); retrying in 270 ms
warning: error: unable to download 'https://github.com/nixos/nixpkgs/archive/6c33d760f16f52ffc0dd8538b9239808d96ec699.tar.gz': HTTP error 302 () (curl error: Failed to open/read local data from file/application)
response body:
; retrying in 678 ms
warning: error: unable to download 'https://github.com/nixos/nixpkgs/archive/6c33d760f16f52ffc0dd8538b9239808d96ec699.tar.gz': HTTP error 302 () (curl error: Failed to open/read local data from file/application)
response body:
; retrying in 1136 ms
warning: error: unable to download 'https://github.com/nixos/nixpkgs/archive/6c33d760f16f52ffc0dd8538b9239808d96ec699.tar.gz': HTTP error 302 () (curl error: Failed to open/read local data from file/application)
response body:
; retrying in 2423 ms
error:
… while updating the lock file of flake 'git+file:///Users/daniel/.config/nixpkgs?ref=refs/heads/master&rev=e8db349c81d6d6eb35455a72eaae72bce38498c4'
… while updating the flake input 'nixpkgs'
… while fetching the input 'github:nixos/nixpkgs/nixos-unstable-small'
error: unable to download 'https://github.com/nixos/nixpkgs/archive/6c33d760f16f52ffc0dd8538b9239808d96ec699.tar.gz': HTTP error 302 () (curl error: Failed to open/read local data from file/application)
response body:
This happens locally (where I have to confess that I use lix
) and on one of my CI servers, where I use plain nix
:
$ nix --version
nix (Nix) 2.24.10
CI server output looks like this (running nix flake update
):
warning: error: unable to download 'https://api.github.com/repos/ryantm/agenix/commits/HEAD': Failed to open/read local data from file/application (26); retrying in 254 ms
unpacking 'github:ryantm/agenix/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41' into the Git cache...
warning: error: unable to download 'https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz': Failed to open/read local data from file/application (26); retrying in 252 ms
warning: error: unable to download 'https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz': HTTP error 302 (curl error: Failed to open/read local data from file/application); retrying in 615 ms
warning: error: unable to download 'https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz': HTTP error 302 (curl error: Failed to open/read local data from file/application); retrying in 1250 ms
warning: error: unable to download 'https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz': HTTP error 302 (curl error: Failed to open/read local data from file/application); retrying in 2227 ms
error:
… while updating the lock file of flake 'git+file:///workspace/***/dotfiles?ref=refs/heads/master&rev=e8db349c81d6d6eb35455a72eaae72bce38498c4&shallow=1'
… while updating the flake input 'agenix'
… while fetching the input 'github:ryantm/agenix'
error: Failed to open archive (Source threw exception: error: unable to download 'https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz': HTTP error 302 (curl error: Failed to open/read local data from file/application))
Since this happens locally and on a Hetzner server (and using lix
and nix
) I’m at a complete loss.
This seems to only be an issue with GitHub inputs.
The error message (HTTP error 302
) raises more questions than it answers, to be honest.
Anyone know what’s going on here?
Edit
This is something that must’ve broken very recently (on nixos-unstable-small
), as an older generation works just fine.
Sadly on some machines, the older generation was already garbage-collected. Not sure what to do in that case …