Skip to content

pixi publish ignores S3-compatible non-AWS endpoint configuration #6066

Closed

Description

@ndeybach

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Commands I ran and their output:

$ pixi publish --target-channel s3://my-conda-channel/main -vvv

📦 Publishing 1 package(s) to channel s3://my-conda-channel/main
INFO pixi_cli::publish: Uploading packages to S3: s3://my-conda-channel/main
Error:   × Failed to initialize S3 channel: Unexpected (persistent) at stat, context: { url: https://my-conda-channel.s3.<region>.amazonaws.com/main/noarch/repodata.json, called: http_util::Client::send, service: s3, path: noarch/repodata.json } => send http request

And after that (and in contrast working well / as expected):

$ pixi upload s3 \
  --channel s3://my-conda-channel/main \
  --endpoint-url https://s3.example-region.example.com \
  --region example-region \
  --addressing-style path \
  path/to/package.conda \
  -vvv

INFO rattler_upload::upload::s3: Uploaded package to s3://my-conda-channel/main/linux-64/package.conda

pixi.toml/pyproject.toml file that reproduces my issue:

[workspace]
name = "example-package"
version = "0.1.0"
channels = ["conda-forge"]
platforms = ["linux-64"]
preview = ["pixi-build"]

[workspace.s3-options.my-conda-channel]
endpoint-url = "https://s3.example-region.example.com"
region = "example-region"
force-path-style = true

[package]
name = { workspace = true }
version = { workspace = true }

[package.build.backend]
name = "pixi-build-python"
version = "*"
channels = ["conda-forge"]

[package.host-dependencies]
python = "*"
setuptools = "*"

[package.run-dependencies]
python = "*"

Global (User wide) Pixi config also contains:

[s3-options.my-conda-channel]
endpoint-url = "https://s3.example-region.example.com"
region = "example-region"
force-path-style = true

But it shouldn't even matter as it should work from pixi.toml workspace definitions.

pixi info output:

Pixi: 0.68.0
OS: Linux
S3 backend: S3-compatible object storage

Other files (e.g. script files, source files, etc.):

N/A

Issue description

pixi publish --target-channel s3://bucket/channel does not appear to apply configured S3-compatible storage options (endpoint-url, region, force-path-style) during its internal S3 upload/channel initialization path. Thus defaulting to aws still and making it impossible to use with any other s3 compatible provider.

In my case, the configured backend is an S3-compatible object storage service:

endpoint-url = "https://s3.example-region.example.com"
region = "example-region"
force-path-style = true

However, pixi publish tries to access an AWS virtual-host URL instead:

https://my-conda-channel.s3.<region>.amazonaws.com/main/noarch/repodata.json

The same package uploads successfully with pixi upload s3 when the equivalent S3 options are passed explicitly on the command line.

Expected behavior

pixi publish --target-channel s3://... should apply the configured s3-options for the target bucket, or otherwise expose equivalent S3 options for publish, so S3-compatible backends can be used the same way as with pixi upload s3.

Activity

  1. added
    bug
    on May 11, 2026
  2. hunger commented on May 11, 2026

    @hunger
    Contributor

    I'll look if I can spot something obvious, but do you have a way for me to reproduce the issue somehow? You said "non-AWS endpoint", so I guess I can not just spin up some bucket on amazon?

  3. ndeybach commented on May 11, 2026

    @ndeybach
    Author

    Hi, personally I use scaleway S3 but since it is not widely used that is why I made it generic (I don't use aws itself). Maybe a cloudeflare R2 or blackblaze B2 would also exibit the problem I think.

    But I guess if the AWS s3 is same as pixi's default then the problem won't show up I imagine.

    Thanks for looking into it !

  4. ndeybach commented on May 11, 2026

    @ndeybach
    Author

    But probably spinning up a bucket on any other than amazon s3 compatible provider, authenticatinng (pixi auth like :

    pixi auth login \
      --s3-access-key-id <key> \
      --s3-secret-access-key <secret> \
      s3://bucket_name

    )
    , and then adding the workspace s3 configs like above :

    [workspace.s3-options.my-conda-channel]
    endpoint-url = "https://s3.example-region.example.com"
    region = "example-region"
    force-path-style = true # may not be needed even since I think default was changed recently to that

    and then trying the pixi publish ...

    That should show up the same problem with other providers..

  5. ndeybach commented on May 11, 2026

    @ndeybach
    Author

    So I have done further testing with:

    pixi upload s3 \
      --channel s3://my-conda-channel/main \
      path/to/package.conda \
      -vvv
    
    DEBUG pixi_config: Loading config from /etc/pixi/config.toml
    DEBUG pixi_config: Loading config from /home/user/.config/pixi/config.toml
    DEBUG pixi_config: Loading config from /home/user/.pixi/config.toml
    DEBUG pixi_config: Loaded config from: /home/user/.pixi/config.toml
    Error:   × an error occurred while loading credentials
      ├─▶ an error occurred while loading credentials
      ├─▶ failed to refresh cached Login token: Your session has expired. Please reauthenticate.
      ├─▶ AccessDeniedException: The refresh token has expired.
      ╰─▶ AccessDeniedException: The refresh token has expired.

    Which seems to indicate that it fallback there to pixi default (AWS), which requires an auth token (not the case of scaleway that only needs the 2 above as most s3 compatible providers).

    So the problem seems that pixi publish AND pixi upload s3 do not read / honnor the [workspace.s3-options.X] config in pixi.toml . But at least pixi upload s3 allows to set them in CLI, which does not seem to be the case for pixi publish if I trust pixi publish -h ...

  6. hunger commented on May 11, 2026

    @hunger
    Contributor

    Seems to be working for me. It does complain about there not being noarch/repodata.json, but I read that as "connection was successfully established based on the data from the configuration" :-)

    It would be great if you could test this as well. Ideally we would merge this today: Then it will be in 0.68.1 planned for tomorrow :-)

  7. hunger commented on May 11, 2026

    @hunger
    Contributor

    Sorry, that PR is incomplete as of yet.

  8. hunger commented on May 11, 2026

    @hunger
    Contributor

    #6069 now needs conda/rattler#2422, to allow for using the same set of credentials for indexing and uploading.

  9. ndeybach commented on May 11, 2026

    @ndeybach
    Author

    Hi @hunger ,

    Sorry for the delay, couldn't use my laptop this afternoon.

    Thanks for the quick diagnostic and fixes in pixi and rattler.

    I have rebuilt on linux (fedora 42) pixi on PR #6069 and against the rattler PR conda/rattler#2422 in rattler and with this (and minor code changes for compatibility of both):

    I can confirm that now it can successfully detect [workspace.s3-options.X] and successfully uploaded to scaleway's S3 🎉 !

    So on my side everything seems working when using those PRs 😉.

  10. hunger commented on May 15, 2026

    @hunger
    Contributor

    Thank you for getting back to us on this issue. The rattler side is merged, we are currently updating pixi to the new rattler version including the fix there, so that the pixi side can be applied as well.

    We hope to do a release with this fix being merged in the next couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions