Authentication fails with uv add
command because the authentication information for the index URL is removed from pyproject.toml
#11708
Labels
question
Asking for clarification or support
Overview
When adding a package from a private GitLab registry using uv add with a PAT embedded in the index URL (and storing credentials in the keyring), the package is initially installed successfully. However, running uv sync later results in a dependency resolution error due to missing authentication credentials.
Reproduction Steps
Adding the Package
The following command was used to add the package. It includes the PAT (
__token__
in the URL) and stores the credentials in the keyring.Syncing the Environment
After the package was added, executing the command below to update the environment resulted in the following error:
Identifying the Cause
Upon examining the generated pyproject.toml, it was found that the authentication token (
__token__
) was removed from the index URL, which prevents the keyring from providing the necessary credentials:Question
Is this behavior intended?
If so, it would be helpful to display a warning message indicating that the credentials have been removed, so that users are aware of the change.
(Apologies if this is already documented or has been reported in another issue.)
Platform
Darwin 23.5.0 arm64
Version
uv 0.6.2 (6d3614e 2025-02-19)
The text was updated successfully, but these errors were encountered: