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
Pip - doesn't pass proxy settings through to git/hg etc. #227
Comments
heya, I'm using pip behind a proxy, and it's really a nightmare atm...lol. Wget Anyhow, pip also doesn't seem to pass on proxy settings to commands like git. Cheers, victor
|
If any workaround or solution is found, we need to remember to comment in 1 - http://stackoverflow.com/questions/5085545/pip-and-svn-
|
1 similar comment
If any workaround or solution is found, we need to remember to comment in 1 - http://stackoverflow.com/questions/5085545/pip-and-svn-
|
Just ran into this today. Really wonder if it matters whether the pip install is run with sudo or not, but seems like a bit of an oversight that it doesn't call the git/svn binary with an instance environment variable for the http_proxy IF one was supplied or is set when the pip command is run. |
As a further note, it appears part of the problem is that the clone is assuming it can use the git (ssh) protocol to perform the clone. If it used http or https instead of git:// it would probably work, at least partially. I'm working around this using a git config option that replaces any requests to git://github.com with https://github.com. |
@johnthagen I was looking at some old issues and was wondering if you had any experience with this one (e.g. for svn as referenced above). |
@cjerdonek Unfortunately I haven't used |
The next step here is for someone to try to reproduce this issue and provide clear steps for reproduction here. |
I'm not sure this is just one issue. The steps to pass proxy settings along to git, svn, etc. may be different for each vcs command. For example, here is info on doing it for git: https://git-scm.com/docs/git-config Here is for svn: http://subversion.apache.org/faq.html#proxy Here is for hg: https://www.mercurial-scm.org/doc/hgrc.5.html#http-proxy And here is for bazaar: http://doc.bazaar.canonical.com/latest/en/user-guide/configuring_bazaar.html#using-a-network-proxy |
Yep yep. We should do that if pip gets a proxy. Part of why I'm curious to see reproduction of this is to know if setting "http_proxy" is a workaround for folks seeing this today (since those vcs tools support that IIUC). |
I use a proxy at work and the env variables work fine for me (at least with git). |
@pfmoore would it be possible for you to try unsetting the environment variable and passing the proxy via --proxy? |
Not for a few weeks, as I'm on holiday right now, sorry. |
FWIW, it should be easy to see what environment variables are passed to the VCS commands since they all go through the VersionControl base class (typing from my phone o/w would link to it). |
Whoops! My bad; I forgot -- enjoy your holiday! :) |
Is there a reason this needs to be implemented in pip? We also do not pass along CA certificates, auto-accept SSH host keys, or handle VCS authentication. It seems like the maintenance burden for these kinds of integration would be high and the payoff pretty low since this kind of configuration would likely need to be done anyway. A quick search reveals that git has tons of flexible options for proxy configuration and hg has a configuration file. A user configuring these globally would make them work across any invoking tools, not just pip. |
@chrahunt I think that's a reasonable argument to be making; closing this issue following the reasoning that Chris listed above. :) |
heya,
I'm using pip behind a proxy, and it's really a nightmare atm...lol. Wget seems to download the packages reliably, but with pip, I have to set the timeout to 30 seconds, and it's still a hit and miss. I wish it's proxy support was better.
Anyhow, pip also doesn't seem to pass on proxy settings to commands like git. Even with environmental variables set, as well as passing the "--proxy" setting to pip, git/hg/etc. seems to completely ignore that, and try to download directly instead of via the proxy.
Cheers,
victor
The text was updated successfully, but these errors were encountered: