Skip to content
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

Include HTTP proxy environment variables in default passenv #1500

Merged
merged 1 commit into from
Jan 22, 2020

Conversation

pfmoore
Copy link

@pfmoore pfmoore commented Jan 16, 2020

Add HTTP proxy variables to the default passenv

Closes #1498

Contribution checklist:

(also see CONTRIBUTING.rst for details)

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation
  • added relevant issue keyword
    in message body
  • added news fragment in changelog folder
    • fragment name: <issue number>.<type>.rst for example (588.bugfix.rst)
    • <type> is must be one of bugfix, feature, deprecation,breaking, doc, misc
    • if PR has no issue: consider creating one first or change it to the PR number after creating the PR
    • "sign" fragment with "by :user:<your username>"
    • please use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files - by :user:superuser."
    • also see examples
  • added yourself to CONTRIBUTORS (preserving alphabetical order)

@pfmoore
Copy link
Author

pfmoore commented Jan 22, 2020

The CI failure looks unrelated, but I don'thave permission to restart that test in order to confirm. Can someone do so, please?

@gaborbernat gaborbernat merged commit 33fd18b into tox-dev:master Jan 22, 2020
philroche added a commit to philroche/lpshipit that referenced this pull request Feb 9, 2021
If a proxy has been configured on the host using environment
variables http_proxy or https_proxy then the container will inherit
this proxy config for the default user [1]. However then calling sudo
this proxy config is no longer configured. To fix this and so sudo
calls use the same proxy we can use `--preserve-env` [2] to pass
in a list of environment variables we want set for sudo user too.

We don't have to set proxy for pip install explicitly as if the http_proxy
or https_proxy variables are set then pip will use that proxy [3]. This is
the case for tox too [4].

[1] https://lxd.readthedocs.io/en/latest/environment/
[2] http://manpages.ubuntu.com/manpages/focal/man8/sudo.8.html
[3] https://pip.pypa.io/en/stable/user_guide/#using-a-proxy-server
[4] tox-dev/tox#1500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

include the HTTP proxy environment variables in PASSENV by default
2 participants