-
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
poetry config not working for HTTP auth so unable to pull private package #2125
Comments
Thank you poetry for being awesome and thanks @viveksair for creating this issue. I also can confirm this bug. Python version: 3.6.8 pyproject.toml [[tool.poetry.source]]
name = "foo"
url = "https://foo.bar/simple"
secondary = true poetry add poetry add -vvv private_package
Using virtualenv: /Users/foo/.pyenv/versions/3.6.8/envs/py368_tf111
PyPI: No packages found for private_package *
anofau-test: 0 packages found for private_package *
[ValueError]
Could not find a matching version of package private_package
Traceback (most recent call last):
File "/Users/foo/.poetry/lib/poetry/_vendor/py3.6/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/Users/foo/.poetry/lib/poetry/_vendor/py3.6/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/Users/foo/.poetry/lib/poetry/_vendor/py3.6/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/Users/foo/.poetry/lib/poetry/_vendor/py3.6/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/Users/foo/.poetry/lib/poetry/console/commands/add.py", line 89, in handle
packages, allow_prereleases=self.option('allow-prereleases')
File "/Users/foo/.poetry/lib/poetry/console/commands/init.py", line 302, in _determine_requirements
requirement['name'], allow_prereleases=allow_prereleases
File "/Users/foo/.poetry/lib/poetry/console/commands/init.py", line 338, in _find_best_version_for_package
'Could not find a matching version of package {}'.format(name) poetry/poetry/console/commands/init.py Line 338 in 12db4a5
|
Big, big thanks for poetry! ❤️ I have the exact same problem with nexus. Funnily enough pip is able to locate the image when using the exact same user, url and password:
Poetry just spits out that I wasn't able to locate anything. |
When using a source with basic auth without configuring the credentials correctly, the source is silently seen as empty. At
there is only a check for 404. Meanwhile 401 is parsed, no content is found (it's a you have to log in page) and an empty list is returned, resulting in a lock simply saying there is a solver problem and no valid version is found. After some trial and error, I was able to get poetry to pick up the basic auth configuration and see dependencies. The main issue here is that there should be a check for 200 and if not, throw an exception. |
I'm having the same issue... Nevermind, I got the naming of the variables wrong |
There was an issue with the environment variables not being respected that is long fixed on 1.2.x -- please open a new issue if you are setting the variables correctly and run into issues. |
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. |
-vvv
option).Issue
and I tried with env as well
POETRY_HTTP_BASIC_FOO_USERNAME POETRY_HTTP_BASIC_FOO_PASSWORD
but not working.but
poetry add private_package
working after mounting config & password at~/.config/pypoetry/auth.toml & ~/.config/pypoetry/config.toml
problem with mounting config is throwing user and password when error occurred while
poetry install
and I have to adddefault = true
to[[tool.poetry.source]]
to my pyproject.tomlThe text was updated successfully, but these errors were encountered: