Skip to content

Comments

Add support for PyPI API tokens#1275

Merged
sdispater merged 1 commit intodevelopfrom
pypi-tokens
Aug 2, 2019
Merged

Add support for PyPI API tokens#1275
sdispater merged 1 commit intodevelopfrom
pypi-tokens

Conversation

@sdispater
Copy link
Member

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

PyPI recently added support for token-based authentication to upload packages: https://pypi.org/help/#apitoken

This PR adds support for that use case in Poetry.

Users can now configure tokens via the config command:

poetry config pypi-token.pypi my-token

It's also possible to provide an environment variable holding the value of the token:

export POETRY_PYPI_TOKEN_PYPI=my-token

@sdispater sdispater added area/config Related to configuration management kind/feature Feature requests/implementations area/publishing Related to PyPI/PEP 503 publishing labels Aug 2, 2019
@sdispater sdispater added this to the 1.0 milestone Aug 2, 2019
@sdispater sdispater merged commit e5e706a into develop Aug 2, 2019
@sdispater sdispater deleted the pypi-tokens branch August 2, 2019 12:45
@danieleades
Copy link
Contributor

just for some clarification, is this intended to support token-based authentication on alternative pypi registries, or only the public registry?

I can confirm that i can add packages from my local (artifactory) pypi registry using username/password auth, but not with an API key

@github-actions
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/config Related to configuration management area/publishing Related to PyPI/PEP 503 publishing kind/feature Feature requests/implementations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants