prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
3.38k stars 193 forks source link

Support `custom_multichannels` #2177

Open MartinJepsen opened 1 month ago

MartinJepsen commented 1 month ago

Problem description

I work with conda/mamba/micromamba and rely on custom_multichannels in my .condarc/.mambarc.

Example:

# .condarc
custom_multichannels:
  renopexconda:
    - https://***:***@artifactory.****.com/artifactory/api/conda/renopexconda-pytools
    - https://***:***@artifactory.****.com/artifactory/api/conda/renopexconda-feedstock
  renopexconda-dev:
    - https://***:***@artifactory.****.com/artifactory/api/conda/renopexconda-pytooldev

Basically this works like aliases for channels, where an alias can span one or several other channels.

I did not find out how to accomplish this with Pixi, and it seems that it's not supported.

Is there a way of doing this with Pixi?

Thoughts

ruben-arts commented 1 month ago

Good question, I'm not sure we're going to support the multichannel setup. We're currently also not supporting defaults for that same reason.

What is the benefit of having multiple channels in this case?

MartinJepsen commented 1 month ago

Apart from a little extra flexibility on the user side, there's not much difference between a virtual channel on artifactory (covering multiple subchannels) and a multichannel in the .condarc.

I could give the virtual channel a shot and see if I can set them as default channels in the config.toml. I suppose that I would put the credentials in the authentication override file. I'll come back after trying it out :-)

MartinJepsen commented 1 month ago

OK, so I just tried the following:

  1. Fresh project with pixi init pixi_test

  2. Add ./.pixi/config.toml with

    default_channels = ["conda-forge", "artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools"]
    authentication-override-file = "/home/majp/sandbox/pixi_test/.pixi/auth.json"
  3. Add ./pixi/auth.json with:

    {
        "artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools": {
            "BasicHTTP": {
                "username": "majp@ramboll.com",
                "password": "*******"
            }
        }
    }
  4. Search for a package that's only located in renopexconda-pytools:

    pixi search pyrosap -vvv

which yields this:

Click me ``` DEBUG pixi_config: Loading config from /etc/pixi/config.toml DEBUG pixi_config: Failed to load system config: /etc/pixi/config.toml (error: failed to read config from '/etc/pixi/config.toml') DEBUG pixi_config: Loading config from /home/majp/.config/pixi/config.toml DEBUG pixi_config: Failed to load global config: /home/majp/.config/pixi/config.toml (error: failed to read config from '/home/majp/.config/pixi/config.toml') DEBUG pixi_config: Loading config from /home/majp/.config/pixi/config.toml DEBUG pixi_config: Failed to load global config: /home/majp/.config/pixi/config.toml (error: failed to read config from '/home/majp/.config/pixi/config.toml') DEBUG pixi_config: Loading config from /home/majp/.pixi/config.toml DEBUG pixi_config: Failed to load global config: /home/majp/.pixi/config.toml (error: failed to read config from '/home/majp/.pixi/config.toml') DEBUG pixi_config: Loading config from /home/majp/sandbox/pixi_test/.pixi/config.toml INFO pixi_config: Loaded config from: /home/majp/sandbox/pixi_test/.pixi/config.toml Using channels: conda-forge, https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/ INFO pixi_utils::reqwest: Loading authentication from file: "/home/majp/sandbox/pixi_test/.pixi/auth.json" DEBUG pixi_config: Loading config from /etc/pixi/config.toml DEBUG pixi_config: Failed to load system config: /etc/pixi/config.toml (error: failed to read config from '/etc/pixi/config.toml') DEBUG pixi_config: Loading config from /home/majp/.config/pixi/config.toml DEBUG pixi_config: Failed to load global config: /home/majp/.config/pixi/config.toml (error: failed to read config from '/home/majp/.config/pixi/config.toml') DEBUG pixi_config: Loading config from /home/majp/.config/pixi/config.toml DEBUG pixi_config: Failed to load global config: /home/majp/.config/pixi/config.toml (error: failed to read config from '/home/majp/.config/pixi/config.toml') DEBUG pixi_config: Loading config from /home/majp/.pixi/config.toml DEBUG pixi_config: Failed to load global config: /home/majp/.pixi/config.toml (error: failed to read config from '/home/majp/.pixi/config.toml') DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: checking availability of 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json.zst' DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: reqwest::connect: starting new connection: https://artifactory.ramboll.com/ DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: checking availability of 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json.bz2' DEBUG hyper_util::client::legacy::connect::dns: resolving host="artifactory.ramboll.com" DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: reqwest::connect: starting new connection: https://artifactory.ramboll.com/ DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: checking availability of 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.jlap' DEBUG hyper_util::client::legacy::connect::dns: resolving host="artifactory.ramboll.com" DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: reqwest::connect: starting new connection: https://artifactory.ramboll.com/ DEBUG hyper_util::client::legacy::connect::dns: resolving host="artifactory.ramboll.com" DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: checking availability of 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/noarch/repodata.json.zst' DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: reqwest::connect: starting new connection: https://artifactory.ramboll.com/ DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: checking availability of 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/noarch/repodata.json.bz2' DEBUG hyper_util::client::legacy::connect::dns: resolving host="artifactory.ramboll.com" DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: reqwest::connect: starting new connection: https://artifactory.ramboll.com/ DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: checking availability of 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/noarch/repodata.jlap' DEBUG hyper_util::client::legacy::connect::dns: resolving host="artifactory.ramboll.com" DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: reqwest::connect: starting new connection: https://artifactory.ramboll.com/ DEBUG hyper_util::client::legacy::connect::dns: resolving host="artifactory.ramboll.com" DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connecting to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connecting to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connecting to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connecting to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connecting to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connecting to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connected to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connected to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connected to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connected to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connected to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::connect::http: connected to 20.101.176.184:443 DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json.zst' seems to be unavailable DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: reuse idle connection for ("https", artifactory.ramboll.com) DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: pooling idle connection for ("https", artifactory.ramboll.com) DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", artifactory.ramboll.com) DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/noarch/repodata.jlap' seems to be unavailable DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: pooling idle connection for ("https", artifactory.ramboll.com) DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/noarch/repodata.json.bz2' seems to be unavailable DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: pooling idle connection for ("https", artifactory.ramboll.com) DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.jlap' seems to be unavailable DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: pooling idle connection for ("https", artifactory.ramboll.com) DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json.bz2' seems to be unavailable DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: fetching 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json' DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: reuse idle connection for ("https", artifactory.ramboll.com) DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: pooling idle connection for ("https", artifactory.ramboll.com) DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/noarch/repodata.json.zst' seems to be unavailable DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: fetching 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/noarch/repodata.json' DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=NoArch}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: reuse idle connection for ("https", artifactory.ramboll.com) DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: hyper_util::client::legacy::pool: pooling idle connection for ("https", artifactory.ramboll.com) ERROR get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: error=HTTP status client error (401 Unauthorized) for url (https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json) ERROR get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}: rattler_repodata_gateway::gateway: error=HTTP status client error (401 Unauthorized) for url (https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json) × HTTP status client error (401 Unauthorized) for url (https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json) ```

I'm wondering about this:

DEBUG get_or_create_subdir{channel=Channel { platforms: None, base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.ramboll.com")), port: None, path: "/artifactory/api/conda/renopexconda-pytools/", query: None, fragment: None }, name: None } platform=Linux64}:fetch_repo_data{cache_path=/home/majp/.cache/rattler/cache/repodata}: rattler_repodata_gateway::fetch: checking availability of 'https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools/linux-64/repodata.json.zst'

why does it say username: "" and password: None, when I supplied them?

I also tried

$ pixi auth login --username=majp@ramboll.com --password=*****  artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools -vvv
Authenticating with artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools

and got the same output when searching for the package.

MartinJepsen commented 1 month ago

For good measure, I just tried

curl -u "majp@ramboll.com:******" -v https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools

and got a successful response

MartinJepsen commented 1 month ago

I does work when I put this in pixi.toml:

[project]
authors = ["Martin Jepsen <majp@ramboll.com>"]
channels = ["https://majp%40ramboll.com:****@artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools"]
description = "Add a short description here"
name = "pixi_test"
platforms = ["linux-64"]
version = "0.1.0"

[tasks]

[dependencies]
MartinJepsen commented 1 month ago

It also works if I set the credentials with

keyring set https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools majp@ramboll.com

Is the problem down to how the auth override JSON is handled?

ruben-arts commented 1 month ago

It could be, asking @wolfv for some input as he worked on the authentication.

MartinJepsen commented 1 month ago

I deleted the keyring entry again with

keyring del https://artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools majp@ramboll.com

and then I removed by credentials in auth.json. To my surprise, everything still worked. Turned out my credentials had gone into ~/.rattler/credentials.json. I removed that and got the expected failures.

So currently, I can conclude that: