Since around 2 weeks ago, when running nix flake update --commit-lock-file (or nix build when a connection to GitHub is required), I get this error:
warning: unable to download 'https://api.github.com/repos/nix-community/dns.nix/commits/HEAD': SSL peer certificate or SSH remote key was not OK (60) SSL: no alternative certificate subject name matches target hostname 'api.github.com'; retrying in 305 ms (attempt 1/5)
warning: unable to download 'https://api.github.com/repos/nix-community/dns.nix/commits/HEAD': SSL peer certificate or SSH remote key was not OK (60) SSL: no alternative certificate subject name matches target hostname 'api.github.com'; retrying in 698 ms (attempt 2/5)
warning: unable to download 'https://api.github.com/repos/nix-community/dns.nix/commits/HEAD': SSL peer certificate or SSH remote key was not OK (60) SSL: no alternative certificate subject name matches target hostname 'api.github.com'; retrying in 1004 ms (attempt 3/5)
warning: unable to download 'https://api.github.com/repos/nix-community/dns.nix/commits/HEAD': SSL peer certificate or SSH remote key was not OK (60) SSL: no alternative certificate subject name matches target hostname 'api.github.com'; retrying in 2326 ms (attempt 4/5)
error:
… while updating the lock file of flake 'git+file:///etc/nixos'
… while updating the flake input 'dns'
… while fetching the input 'github:nix-community/dns.nix'
error: unable to download 'https://api.github.com/repos/nix-community/dns.nix/commits/HEAD': SSL peer certificate or SSH remote key was not OK (60) SSL: no alternative certificate subject name matches target hostname 'api.github.com'
My NixOS configuration is available here, “rotkehlchen” is my only host affected by this.
I don’t have any proxy configured, there are no custom TLS certificates, no SSL-related environment variables are set and my system time is correct. Firefox and curl from the command line have no issues connecting to api.github.com.
Since only one device and only the connection to GitHub is affected, I am rather confused. Does anyone know how to debug this?