Skip to content

Improve error handling and message wrt libcurl failures #14985

@samuela

Description

@samuela

I am consistently getting these errors from nix, but the download works fine via curl, Zen browser, or any other reasonable method of downloading files from the internet.

❯ sudo nixos-rebuild switch
Place your right index finger on the fingerprint reader
unpacking 'https://github.com/NixOS/nixos-hardware/archive/9154f4569b6cdfd3c595851a6ba51bfaa472d9f3.tar.gz' into the Git cache...
unpacking 'https://github.com/nix-community/home-manager/archive/44777152652bc9eacf8876976fa72cc77ca8b9d8.tar.gz' into the Git cache...
unpacking 'https://github.com/nix-community/stylix/archive/a7fb3944d1fb4daa073ba82e1a9d34b5f05adb9f.tar.gz' into the Git cache...
^Bbuilding the system configuration...
unpacking 'https://github.com/NixOS/nixpkgs/archive/b9cd0cd124fe67c744e77782bf4b684a43cb44f3.tar.gz' into the Git cache...
warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/b9cd0cd124fe67c744e77782bf4b684a43cb44f3.tar.gz': Timeout was reached (28) Connection timed out after 15031 milliseconds; retrying in 274 ms

❯ curl https://github.com/NixOS/nixpkgs/archive/b9cd0cd124fe67c744e77782bf4b684a43cb44f3.tar.gz > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0   0     0   0     0     0     0  --:--:--  0:00:02 --:--:--     0

❯ echo $status
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    error-messagesConfusing messages and better diagnosticsfetchingNetworking with the outside (non-Nix) world, input locking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions