-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variable POETRY_PYPI_TOKEN_<NAME>
not used by poetry publish -r <name>
#2210
Comments
Same problem occurs when using |
Can't reproduce the pb with the unit tests:
Provided you give valid |
Here's a one-liner workaround that works for me: poetry config http-basic.pypi "__token__" "${POETRY_PYPI_TOKEN_PYPI}" |
seeing the same behaviour as the OP. I was expecting to only need to set the |
There's an still open issue where Poetry doesn't properly reads the env variable to get the PyPi token: python-poetry/poetry#2210
There's an still open issue where Poetry doesn't properly reads the env variable to get the PyPi token: python-poetry/poetry#2210
There's an still open issue where Poetry doesn't properly reads the env variable to get the PyPi token: python-poetry/poetry#2210
Doing |
I actually had the issue and found that it was due to the URL path! I had this, with the URL ending with
It is working fine for the
So @esciara I think that in the doc it should say |
hi, guys. I think the best practice is this: first pass env: export POETRY_HTTP_BASIC_TEST_USERNAME=__token__
export POETRY_HTTP_BASIC_TEST_PASSWORD=pypi-AgENdGVzdC5weX
# poetry not use `POETRY_REPOSITORIES_TEST`
export POETRY_REPOSITORIES_TEST=https://test.pypi.org/legacy/ config poetry repo. eg: ci action poetry config repositories.test ${POETRY_REPOSITORIES_TEST} publish
|
This should have been resolved with #9015. |
#9119 should add regression coverage for this issue. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: 10.15.3 Mac OS X
Poetry version: 1.0.5
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/esciara/dfc058348e597f8586d4f678cc163182
Issue
After setting the following environment variables and verifying the system is correctly set:
and building my package:
I am asked for a username a password when attempting to publish, event thought the token is passed through the environment variable:
I checked the doc (section on environment variables) and it should work.
Workaround
The following workaround using username and password works:
The text was updated successfully, but these errors were encountered: