Open MartinJepsen opened 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?
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 :-)
OK, so I just tried the following:
Fresh project with pixi init pixi_test
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"
Add ./pixi/auth.json
with:
{
"artifactory.ramboll.com/artifactory/api/conda/renopexconda-pytools": {
"BasicHTTP": {
"username": "majp@ramboll.com",
"password": "*******"
}
}
}
Search for a package that's only located in renopexconda-pytools:
pixi search pyrosap -vvv
which yields this:
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.
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
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]
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?
It could be, asking @wolfv for some input as he worked on the authentication.
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:
auth.json
seems to be ignored~/.rattler/credentials.json
. I did not set a password on the keyring, but isn't it kind of risky to store them as plain text without telling the user?~/.rattler/credentials.json
.
Problem description
I work with conda/mamba/micromamba and rely on
custom_multichannels
in my.condarc
/.mambarc
.Example:
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
.condarc
for Conda).