-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Allow REQUESTS_CA_BUNDLE to pass to FILTERED_ENV. #19957
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
base: master
Are you sure you want to change the base?
Conversation
This allows packages that use Python Requests to access custom root certificates that are common with corporate networks (e.g. Zscaler).
@nicksay Can you provide an example of why/when you'd need to use this? Thanks! |
Absolutely; it comes up notably with the
|
@nicksay Is there any other related Homebrew configuration required? It seems a bit non-discoverable to just allow this variable through. Ideally this would share the value with some other Homebrew configuration? |
@MikeMcQuaid There's nothing required with Homebrew itself, just the environment. This is due to how the Requests library handles custom SSL certs. The initial CA bundle and can be supplemented by either modifying the calling code to specify an extra bundle as an argument: requests.get('https://github.com', verify='/path/to/certfile') or by setting the REQUESTS_CA_BUNDLE=/path/to/certfile requests.get('https://github.com') However, the Requests library does fall back to using # Look for requests environment configuration
# and be compatible with cURL.
if verify is True or verify is None:
verify = (
os.environ.get("REQUESTS_CA_BUNDLE")
or os.environ.get("CURL_CA_BUNDLE")
or verify
)
|
@nicksay Sorry about the delayed response! Does If you don't mind me sharing: can you I see your |
@MikeMcQuaid Happy to check for a curl config. Do you have a package you know of that I should try? I'll post my brew config later today. |
@nicksay Any download in Homebrew will end up using |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This allows packages that use Python Requests to access custom root
certificates that are common with corporate networks (e.g. Zscaler).