Skip to content

Commit 67aa1c8

Browse files
mywsigmavirus24
authored andcommitted
Allow setting ca_cert and client_cert in config
Right now, the settings code expects you to be able to set `ca_cert` and `client_cert` in the `pypirc` as properties of the repository (that's what `get_userpass_value` does). However, the parsing code doesn't read those properties in! This minor change fixes that issue, finally allowing the cert to be set anywhere, not just on the command line.
1 parent 7bddd4f commit 67aa1c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

twine/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ def get_config(path="~/.pypirc"):
9090
}
9191

9292
# Optional configuration values
93-
for key in ["username", "repository", "password"]:
93+
for key in [
94+
"username", "repository", "password",
95+
"ca_cert", "client_cert",
96+
]:
9497
if parser.has_option(repository, key):
9598
config[repository][key] = parser.get(repository, key)
9699
elif defaults.get(key):

0 commit comments

Comments
 (0)