-
Notifications
You must be signed in to change notification settings - Fork 772
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
Allow command for tool.uv.index-url
and tool.uv.pip.index-url
#7660
Comments
How would this work with writing index URLs to the lockfile? |
Currently, when I put CodeArtifact credentials in the index-url it strips the credentials and just puts the repository address. I would expect the same behavior. |
For many usecases, the private pypi-credentials are set as environment variables. Would there be a reason to not support variable substitution? For example:
|
@zanieb as I think about this more, it could be more general to have the configuration look like the following:
Ideally, the system call would use the location of the |
Could you just call that script and set the required environment variables prior to using |
Sure, everything except the access token. |
Why can't the access token be in the environment variable? |
In that case I can just put the entire url in the UV_INDEX_URL environment variable, but that doesn't allow dynamic keychain-like credentials |
I'm responding to
In which you wrap uv with a script that sets the relevant variable with authentication. |
Hi @zanieb, perhaps we have gotten away from the central idea of the feature request. Currently, I do pre-set the index-url/extra-index-url. I'm basically requesting something like https://pypi.org/project/keyrings.codeartifact/, but without requiring all the setup for the keyring.
|
UV currently supports using a keyring for the credential provider. However, in my case it's not always practical. I would like to have a simple command line script:
get_pip_credentials.sh
that could invoke something like:scripts/get-pip-credentials.sh
So, in my pyproject.toml:
Likewise, if
--index-url
is specified on the command line, I would prefer that to overridetool.uv.index-url.command
andtool.uv.pip.index-url.command
The text was updated successfully, but these errors were encountered: