Poetry + Private Gitlab Repository - Not working #7083
-
Hi all together, I have a private Gitlab Project with a Package published in the Package Registry. Now I try to use this in a different project using poetry as dependency manager. I tried it as described in this issue comment. So the packaging in the CI pipline went well and the package is available in the package registry. To do this, I followed this tutorial. Then I created a deploy token with scope
When I open the url in the browser, the .whl file is downloaded without any unauthorized error. And also with pip and pipenv the installation of the package works with the same URL as in the issue comment described. So it's not a error in the package or GIT itself. I searched a lot, but I can't find any information why I have this problem with poetry. Has anyone of you an idea, what is wrong here? I'm using the following versions:
Thanks for any answer/help! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You can try the solution in #6799 |
Beta Was this translation helpful? Give feedback.
-
It worked for me when i specifically added the url as a command
|
Beta Was this translation helpful? Give feedback.
-
The information here and in #6799 was very helpful to use poetry 2.0.1 in our private Gitlab instance. How to use the Gitlab package registry on a development hostYou need a personal access token. Add the following section to
If you want to install packages from this registry on a development host through
If you want to add packages from this registry on a development host through
How to use the Gitlab package registry in a CI jobYou need the Use the following job script template to publish the package using script:
- echo -e "machine <gitlab-host>\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}\n" >> ~/.netrc
- poetry config repositories.gitlab ${CI_API_V4_URL}/projects/<project-id>/packages/pypi
- poetry config certificates.gitlab.cert false
- poetry install
- make
- poetry build
- poetry publish --repository gitlab Use the following job script template to install the package using script:
- echo -e "machine git\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}\n" >> ~/.netrc
- pip3 install --index-url ${CI_API_V4_URL}/projects/<project-id>/packages/pypi/simple --trusted-host <gitlab-host> <package-name> |
Beta Was this translation helpful? Give feedback.
You can try the solution in #6799