crane icon indicating copy to clipboard operation
crane copied to clipboard

fetchurl ignores curlOptsList

Open npatsakula opened this issue 6 months ago • 3 comments

Description

Hello @ipetkov!

I updated nix to a new version (nix (Determinate Nix 3.6.2) 2.29.0) and authorization for private repositories stopped working. Apparently, the new version ignores the curlOptsList options.

Reproduction

crane' = crane''.appendCrateRegistries [
  (crane''.registryFromSparse {
   indexUrl = "https://registry.patsakula.ru/api/v1/crates/";
   configSha256 = "sha256:my_secret_sha";
   fetchurlExtraArgs = {
     curlOptsList = [
       "-Hnonvalidflag"
       "Authorization: MySecretKey"
     ];
   };
  })
];

I'm getting 401 even if -Hnonvalidflag is present, so I assume that this options are not passing to curl.

npatsakula avatar Jun 16 '25 12:06 npatsakula

Hi @npatsakula thanks for the report!

I updated nix to a new version (nix (Determinate Nix 3.6.2) 2.29.0) and authorization for private repositories stopped working

Does the error still happen with a regular version of Nix, or even Lix? If not, you should report this to Determinate Systems

ipetkov avatar Jun 17 '25 02:06 ipetkov

Hi @npatsakula thanks for the report!

I updated nix to a new version (nix (Determinate Nix 3.6.2) 2.29.0) and authorization for private repositories stopped working

Does the error still happen with a regular version of Nix, or even Lix? If not, you should report this to Determinate Systems

Unfortunately, yes:(

nix (Nix) 2.29.0
nix (Lix, like Nix) 2.93.0

npatsakula avatar Jun 17 '25 08:06 npatsakula

Thanks for double checking that!

Unfortunately I don't have access to a private registry so I could use some help in debugging this further

ipetkov avatar Jun 20 '25 18:06 ipetkov