Skip to content

uv publish giving Missing credentials for https://upload.pypi.org/legacy/ #8023

@jamesbraza

Description

@jamesbraza

I moved from this GitHub Actions that publishes to PyPI using:

      - uses: pypa/gh-action-pypi-publish@release/v1
        with:
          password: ${{ secrets.PYPI_API_TOKEN }}

To this with uv==0.4.20:

      - run: uv publish
        env:
          UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

However, uv publish fails with:

warning: `uv publish` is experimental and may change without warning
Publishing 2 files https://upload.pypi.org/legacy/
Uploading ldp-0.10.0-py3-none-any.whl (90.7KiB)
error: Failed to publish `dist/repo-0.10.0-py3-none-any.whl` to https://upload.pypi.org/legacy/
  Caused by: Failed to send POST request
  Caused by: Missing credentials for https://upload.pypi.org/legacy/
Error: Process completed with exit code 2.

What am I doing wrong here? Also, I am thinking perhaps the stack could be made more user friendly

Metadata

Metadata

Assignees

Labels

error messagesMessaging when something goes wrong

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions