-
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
Can't use private repository in poetry add
#233
Comments
have you tried changing if you're using the It'd be nice to have some attempted diagnostics (like wrong format vs 404/403 or something). |
@ojii You might want to try the latest preview release ( |
I'm using the exact same URL that works fine with
|
Got same issue. Private repository configured step by step like described in https://poetry.eustace.io/docs/repositories/.
Interesting fact if in
As PyPI server we use Artifactory by JFrog. And poetry version is |
So as I understand from code base when And for example in case of |
@sdispater am I right? |
|
Can it be fixed soon? |
I've created a PR #307 with fix. |
I am facing a similar issue (not able to add package from a private repository) though its not related to authentication.
Trying to add -vvv gives this:
I tried to look into the problem and found that the As of now, I am adding a catch block for |
Any news on this? @sdispater? |
… legacy repo (#233) (#306) * Adding support for HTTP Basic Auth when pulling from legacy repo * added docs * Adding unit test for http auth * Adding mock to dev deps * moved config reading logic to helper function, adapted test * corrections * rework pip_installer * use source_reference as repo name when writing lock file and installing
… legacy repo (#233) (#306) * Adding support for HTTP Basic Auth when pulling from legacy repo * added docs * Adding unit test for http auth * Adding mock to dev deps * moved config reading logic to helper function, adapted test * corrections * rework pip_installer * use source_reference as repo name when writing lock file and installing
Why is this issue closed?
See also verbose output. There is no authentication in my repo. The path from I was able to overcome this by adding the package manually into pyproject.toml as well as this section:
Then I deleted poetry.lock and issued @sdispater should I open a new issue? P.S. My username, package name and URL are consistently changed into other values.
|
With version 1.0.0b9 it shows this:
If I add Edit: I don't think so because:
|
This issue should be reopened. The problem still happens in poetry 1.0.5. |
I have the same problem poetry 1.0.5. |
EDIT: I've fixed this, by adding Same issue in
And here's the project config
The weird part is that I had |
still a source of confusion not mentioned in any docs I could find. @LSaldyt fix worked though. |
Got it working thanks to @LSaldyt /simple/ trick. -vvv showed that it wasn't looking at all for my custom private repository. It was pretty hard to understand since I was copying and pasting the url from gitlab suggestion, can this be added explicitly to the docs? |
For those who get the "Could not find a matching version of package " when trying to install from private repo $ poetry add my_package
ValueError
Could not find a matching version of package my_package Try to add [[tool.poetry.source]]
name = "myrepo"
url = "https://my.rul/simple/" That solved the problem for me with AWS CodeArtifact repository. Curiously, during authentication for publishing while setting the |
I am experiencing the same problem. Using the solution suggested by @vduseev works for getting dependencies from my private repo, but prevents me from uploading the version from this package to the same repo, probably because of the "/simple/" path of the repo url in the pyproject.toml file. Could you please investigate further? Many thanks... |
A possible "fix" or workaround could be to bypass the url in the pyproject.toml by adding this code to the publishing/uploader.py file at line 110: This removes the simple suffix from the url configured in the toml file. And yes I know, that this is very ugly.... |
* change type annotations to type hints using com2ann * add missing type hints to core * add type hints to tests * add missing type hints to stanza * add flake8-annotations to flake8 pre-commit hook
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. |
Poetry version: 0.10.3
Python Version: 3.6.5
(Note: I redacted URL of my private repository)
pyproject.toml:
I ran the following two commands:
poetry config repositories.private <url>
poetry config http-basic.private <username>
Checking the config files on disk, the values are correct.
When I run
poetry search <private package>
orpoetry add <private package>
poetry cannot find the package. Here's the output ofpoetry -vvv add
:We use pypicloud for our private repository.
The text was updated successfully, but these errors were encountered: