mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
[fix] allow the user to overwrite the no_input flag to pip (#5036)
Support `no_input` flag for when you want to e.g. use keyring to authenticate against Google Artifact Registry.
This commit is contained in:
@@ -107,6 +107,38 @@ Environment variables in the URL part of requirement specifiers can also be expa
|
||||
|
||||
Keep in mind that environment variables are expanded in runtime, leaving the entries in ``Pipfile`` or ``Pipfile.lock`` untouched. This is to avoid the accidental leakage of credentials in the source code.
|
||||
|
||||
☤ Injecting credentials through keychain support
|
||||
------------------------------------------------
|
||||
|
||||
Private regirstries on Google Cloud, Azure and AWS support dynamic credentials using
|
||||
the keychain implementation. Due to the way the keychain is structured, it might ask
|
||||
the user for input. Asking the user for input is disabled. This will disable the keychain
|
||||
support completely, unfortunately.
|
||||
|
||||
If you want to work with private registries that use the keychain for authentication, you
|
||||
can disable the "enforcement of no input".
|
||||
|
||||
**Note:** Please be sure that the keychain will really not ask for
|
||||
input. Otherwise the process will hang forever!
|
||||
|
||||
[[source]]
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[[source]]
|
||||
url = "https://europe-python.pkg.dev/my-project/python/simple"
|
||||
verify_ssl = true
|
||||
name = "private-gcp"
|
||||
|
||||
[packages]
|
||||
flask = "*"
|
||||
private-test-package = {version = "*", index = "private-gcp"}
|
||||
|
||||
[pipenv]
|
||||
disable_pip_input = false
|
||||
|
||||
Above example will install ``flask`` and a private package ``private-test-package`` from GCP.
|
||||
|
||||
☤ Specifying Basically Anything
|
||||
-------------------------------
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
allow the user to disable the ``no_input`` flag, so the use of e.g Google Artifact Registry is possible.
|
||||
@@ -518,7 +518,7 @@ class Resolver:
|
||||
pip_options, _ = self.pip_command.parser.parse_args(self.pip_args)
|
||||
pip_options.cache_dir = self.project.s.PIPENV_CACHE_DIR
|
||||
pip_options.no_python_version_warning = True
|
||||
pip_options.no_input = True
|
||||
pip_options.no_input = self.project.settings.get("disable_pip_input", True)
|
||||
pip_options.progress_bar = "off"
|
||||
pip_options.ignore_requires_python = True
|
||||
pip_options.pre = self.pre or self.project.settings.get(
|
||||
|
||||
Reference in New Issue
Block a user