You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use a private PyPI server hosted on Gitlab, which requires authentication. If Gitlab's API token was expired or misconfigured, installing an already locked poetry project (also with poetry install -vvv) gives a misleading error: Unable to find installation candidates for <package-name> (0.1.2). This is misleading and drives people to search what is wrong with, for example, the lockfile. Instead of pointing to the direct cause (wrong credentials).
Interestingly, when running poetry install with no lockfile present, dependency resolution does fail with the log message: Source (gitlab): Authorization error accessing https://gitlab.com/api/v4/groups/<group>/-/packages/pypi/simple/<private-package>/, stopping with error message Because mwe-poetry depends on <private-package> (*) which doesn't match any versions, version solving failed.
A minimum working example for which this behavior shows:
Authentication is configured using poetry config http-basic.gitlab <username>
Impact
In combination with the fact that the GNOME keyring is somewhat opaque, missing this error message often makes it hard to determine what is the source of an installation error (keyring is still locked, package (version) is not available or credentials are incorrect).
Workarounds
No
Version info
poetry: 1.8.3
python: 3.10.12
Pop!OS 22.04
The text was updated successfully, but these errors were encountered:
Issue Kind
Change in current behaviour
Description
We use a private PyPI server hosted on Gitlab, which requires authentication. If Gitlab's API token was expired or misconfigured, installing an already locked poetry project (also with
poetry install -vvv
) gives a misleading error:Unable to find installation candidates for <package-name> (0.1.2)
. This is misleading and drives people to search what is wrong with, for example, the lockfile. Instead of pointing to the direct cause (wrong credentials).Interestingly, when running
poetry install
with no lockfile present, dependency resolution does fail with the log message:Source (gitlab): Authorization error accessing https://gitlab.com/api/v4/groups/<group>/-/packages/pypi/simple/<private-package>/
, stopping with error messageBecause mwe-poetry depends on <private-package> (*) which doesn't match any versions, version solving failed.
A minimum working example for which this behavior shows:
Authentication is configured using
poetry config http-basic.gitlab <username>
Impact
In combination with the fact that the GNOME keyring is somewhat opaque, missing this error message often makes it hard to determine what is the source of an installation error (keyring is still locked, package (version) is not available or credentials are incorrect).
Workarounds
No
Version info
poetry
:1.8.3
python
:3.10.12
The text was updated successfully, but these errors were encountered: