-
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
Authentication for Private PyPi server fails #4902
Comments
I've been unable to get the private repositories working when trying to specify the credentials in the URL with the latest versions(s) of poetry ( My
But when trying to install the package, it fails with the following error (output cleaned up a bit)
Some things I noticed
This issue, and #4900 and #3802, are completely blocking me from using Poetry to manage dependencies from private repositories. @python-poetry/triage |
In general, this code path seems wonky: |
I'm running into this problem with my companies Nexus repository. I currently have to hard code the username/password in the url inside the
and only difference is I get a 401. I've tried several older versions of Poetry with no luck. |
SOLVEDI forgot to add So, the remedy to my problem was finish gitlab's repository url with # So this:
[[tool.poetry.source]]
name = "gitlab"
url = "https://gitlab.com/api/v4/projects/<project-id>/packages/pypi"
# must be instead this:
[[tool.poetry.source]]
name = "gitlab"
url = "https://gitlab.com/api/v4/projects/<project-id>/packages/pypi/simple" Hello folks, poetry config repositories.gitlab https://gitlab.com/api/v4/projects/<my-project-id>/packages/pypi
poetry config http-basic.gitlab <username> <password> After that, I am able to successfully publish packages to there with: poetry publish -r gitlab But I cannot figure out, how to install a package from this private repository. I added this section to project's [[tool.poetry.source]]
name = "gitlab"
url = "https://gitlab.com/api/v4/projects/<my-project-id>/packages/pypi" I also tried adding ValueError
Could not find a matching version of package <package>
at ~/.local/share/pypoetry/venv/lib64/python3.10/site-packages/poetry/console/commands/init.py:367 in _find_best_version_for_package
363│ )
364│
365│ if not package:
366│ # TODO: find similar
→ 367│ raise ValueError(
368│ "Could not find a matching version of package {}".format(name)
369│ )
370│
371│ return package.pretty_name, selector.find_recommended_require_version(package) I tried everything in pure install as well (vanilla Fedora installation in virtual machine) - no fancy tools like Also, worth mentioning, I tried these variants for auth setting with
All this variants do work for publishing, but none of them works for install it from that repo. For testing installing from private repo, I don't have any other dependency in the project. I created new dummy project with Am I doing something wrong? Any advises, please? Thanks |
Closing for now as there's no good reproduction and everything works as expected with private sources on 1.2.1. If you have an issue like this, please reproduce it in a clean environment and provide detailed instructions in your new issue report. |
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
Hey everyone, I have an issue that I believe was described on this ticket, but the ticket was closed without a clear solution for the problem: #3216
Basically, under Linux, my dependencies are not installed, as Poetry cant authenticate to my private pypi server. The issue seems related to the keyring lib in Linux. It seems Poetry cant find the credentials, even so that the credentials were configured as specified by the docs:
The error issued was the following:
I have also annexed the stack trace.
The solutions I found were the following:
Remove the keyring settings or disable them as specified here: https://blog.frank-mich.com/python-poetry-1-0-0-private-repo-issue-fix/
Pass directly the credentials to the pypi server link in the .toml like:
Also it is worth to mention that I didnt experience this error under MacOS or a Docker python:3.10.0-buster (Debian) container environment.
The text was updated successfully, but these errors were encountered: