-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Builtin fetchurl ignores netrc-file #6942
Comments
netrc support is part of the nixpkgs fetchurl function https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/default.nix#L170-L173 , so it is no surprise that the builtin fetchurl does not support it which makes this a feature request, not a bug. |
Okay feel free to relabel it. Thanks for letting me know about the Nixpkgs usage; that actually helps me quite a bit. It's interesting that that's a config flag for Nix when Nixpkgs is the actual consumer, Nixpkgs' config seems more intuitive; but I'm sure there's a history ( security? ) or roadmap that explains why it's handled by Nix. |
I'm really confused about the behavior of Nix and the netrc file in general. Especially in comparison to the newer However, on the CI macine, with the same Nix version, and the same exact netrc, I keep getting 401s, and I am entirely at a loss as to why. Both machines also have |
Various fetchers use different auth mechanisms, in general I found that you have to set all of these to make everything work.
I should trace through the code again and do a writeup on which fetchers use which auth for the wiki. IIRC generally flake inputs use * paths may be inaccurate, writing from memory |
You should probably put it directly into the documentation in this repo, rather than the wiki, imo That said, it still doesn't explain my current "works on my machine" predicament |
I know this isn't officially supported so feel free to close it. I'm reporting this for the awareness of contributors.
The internal built-in derivation builder for fetchurl does not adhere to the users' config for netrc-file.
A suitable workaround is to use the default of
/etc/nix/netrc
or~/.config/nix/netrc
.This occurs in Nix 2.8-10 on Linux and Darwin.
Again, I don't think anyone should fix this without a compelling reason. Just wanted to let you know.
The text was updated successfully, but these errors were encountered: