-
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
Processing configuration for http auth (environment variables) #1871
Comments
I just ran into this. The documentation clearly states this fact in multiple places and this is referenced also in PRs/issues connected to private repositories. A usable workaround is writing the config each time via |
I can confirm this bug. Temporary workaround would be setting |
I cannot reproduce this issue anymore with the most recent version of poetry (v1.0.9).
|
Can confirm this bug persists on poetry 1.1.12, and this workaround is effective |
This is solved on the 1.2 branch. |
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: Windows 10, 64-bit.
Poetry version: 1.0.2
Issue
Documentation says that any config value can be passed through an environment variable
POETRY_<config>
as well as secrets for private repos. However, I suspect that the code doesn't process secrets correctly.Setup:
auth.toml
file.config.toml
.pyproject.toml
contains url and name for the same private repo.pyproject.toml
references one package from the private repo.POETRY_HTTP_BASIC_REPO_PASSWORD
andPOETRY_HTTP_BASIC_REPO_USERNAME
are set.POETRY_HTTP_BASIC_REPO
is not set.print
) is added to poetry source code.Outcome:
Thoughts:
It looks like get_http_auth expects a dictionary. We can only get a dictionary if we read from the config file, not the environment variable. Or am I wrong here?
I made more experiments around this (like defining
POETRY_HTTP_BASIC_REPO
with various content), but couldn't get around the fact thatauth
must be a dictionary.Variables
POETRY_HTTP_BASIC_REPO_USERNAME
andPOETRY_HTTP_BASIC_REPO_PASSWORD
seem never to be read. Only if I reference them with smth like this:but this gets me nowhere as this is again not a dictionary.
Conclusion
It seems to me that either the code or documentation shall be changed. My suspicion is that the code follows your design and you won't want to change it. So perhaps the documentation shall be a bit more clear about such usage.
This issue is somewhat related to #208 .
The text was updated successfully, but these errors were encountered: