uv icon indicating copy to clipboard operation
uv copied to clipboard

Configuring multiple indexes with `uv publish`

Open cthoyt opened this issue 1 year ago • 0 comments

This issue is related to #7676.

I would like to switch from twine to uv publish, but in my workflow, I first upload to Test PyPI then later to vanilla PyPI. This means that I need to have configuration for the separate username and token for each index.

Currently, the only way that I saw to get the username and token into uv publish is by an environment variable or passing separately as flags (ref Oct. 7th). This isn't so convenient to set and unset to different values during a single workflow, or require me to shuttle text through flags in a potentially messy/insecure way. Further, there are probably people who have private indexes they also want to quickly switch between vanilla PyPI, test PyPI, and their private indexes.

One solution from the PyPA was to keep track of different index-servers in the .pypirc file (ref). There have been reservations about relying on text-based configurations, but currently as it is, it's not comfortable to switch to uv publish (even though I want to!)

cthoyt avatar Oct 07 '24 09:10 cthoyt