-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
Request: leave environment variable references as-is in requirements.txt output. #2063
Comments
Does |
Ah, interesting. Makes sense, then. Though, personally, I'd want the constraint files to be generated without any extra options. |
Is there an easy alternative? I know pip-compile will pass through pip arguments such as the index URL, but then that shifts the credentials to the pre-commit config, which is also in version control and doesn't natively support environment variable substitutions. |
I'm not sure. Does pip support |
It does: https://stackoverflow.com/a/55978589/107510
|
As per the above link, it also seems to be possible to use environment variables in |
Case closed, then? |
Yeah, I guess so! It seems like there is a reasonably safe way to use custom indexes without revealing secrets in the files. I think there is still a minor footgun since it's surprising, but maybe #1876 is the easy way to address that. |
Yep, that sounds like a reasonable request. |
What's the problem this feature will solve?
When using private package indexes, you can supply credentials in the index URL via environment variables.
If you do this in your
requirements.in
file,pip-compile
will output the credentials into therequirements.txt
file.This makes it difficult to use pip-tools when using a private index, since ideally you could commit requirements.txt to version control without having to make any tweaks or downstream adjustments.
Describe the solution you'd like
I would like any environment variable references to appear in the output requirements.txt file, without the actual values being substituted in.
Alternative Solutions
Additional context
This could complement #1876 or make it unnecessary.
The text was updated successfully, but these errors were encountered: