From 025a028c471a1c2ae88bd846bdf25f74b9c29529 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Thu, 5 Oct 2023 14:40:32 +0200 Subject: fetchgit: fix private fetching via netrc This fixes a regression introduced in https://github.com/NixOS/nixpkgs/pull/256628 which broke fetching with private = true through a netrc file. Tested locally with a really special github enterprise. --- pkgs/build-support/fetchgit/nix-prefetch-git | 1 + 1 file changed, 1 insertion(+) (limited to 'pkgs/build-support/fetchgit') diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 1194b39dafd..8e3fe456e68 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -417,6 +417,7 @@ fi tmpHomePath="$(mktemp -d "${TMPDIR:-/tmp}/nix-prefetch-git-tmp-home-XXXXXXXXXX")" exit_handlers+=(remove_tmpHomePath) HOME="$tmpHomePath" +ln -s /build/.netrc "$HOME/" unset XDG_CONFIG_HOME export GIT_CONFIG_NOSYSTEM=1 -- cgit 1.4.1