Does not store repository credentials
-
[x] I am on the latest Poetry version.
-
[x] I have searched the issues of this repo and believe that this is not a duplicate.
-
[x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption). -
OS version and name: macOS Big Sur 11.6
-
Poetry version: 1.1.11
Issue
Poetry does not store the password for my private repo when using the config command as outlined in the documentation.
poetry config http-basic.gitlab username password
This, to no surprise, leads to an authentication error when trying to install a package from that private repo.
I found out that no password is stored by directly checking the configuration in ~/Library/Application Support/pypoetry/auth.toml, reading simply:
[http-basic]
[http-basic.gitlab]
username = "username"
By adding the following line, I was able to patch the issue:
password = "password"
However, the password disappears every time I run the config command again:
poetry config http-basic.gitlab username password
Relevant section of my pyproject.toml:
[[tool.poetry.source]]
name = "gitlab"
url = "https://gitlab.com/api/v4/groups/1123.../-/packages/pypi/simple"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
I assume this is an overlap of
- 'keys are not stored in auth.toml' and
- a GitLab-with-Poetry limitation:
/projects/<ID>/works,/groups/<ID>/not.
As Poetry uses keyring, the password should be somewhere secured in your system (macOS→Keychain).
I'm not sure yet, Poetry actually works with url = "https://gitlab.com/api/v4/groups/....
I mean it should, as pip install works with both, projects and groups.
So maybe this is a Poetry bug. Or did someone manage to let [[tool.poetry.source]] work with GitLab groups?