File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,25 @@ $ echo "your-password" | keyring set pypi.company.com your-username
74
74
$ pip install your-package --index-url https://pypi.company.com/
75
75
```
76
76
77
+ Pip is conservative and does not query keyring at all when ` --no-input ` is used
78
+ because the keyring might require user interaction such as prompting the user
79
+ on the console. You can force keyring usage by passing ` --force-keyring ` or one
80
+ of the following:
81
+
82
+ ``` bash
83
+ # possibly with --user, --global or --site
84
+ $ pip config set global.force-keyring true
85
+ # or
86
+ $ export PIP_FORCE_KEYRING=1
87
+ ```
88
+
89
+ ``` {warning}
90
+ Be careful when doing this since it could cause tools such as Pipx and Pipenv
91
+ to appear to hang. They show their own progress indicator while hiding output
92
+ from the subprocess in which they run Pip. You won't know whether the keyring
93
+ backend is waiting the user input or not in such situations.
94
+ ```
95
+
77
96
Note that ` keyring ` (the Python package) needs to be installed separately from
78
97
pip. This can create a bootstrapping issue if you need the credentials stored in
79
98
the keyring to download and install keyring.
Original file line number Diff line number Diff line change
1
+ Add ``--force-keyring `` flag which allows ``keyring `` lookups in combination
2
+ with ``--no-input ``. See the Authentication page in the documentation for
3
+ more info.
You can’t perform that action at this time.
0 commit comments