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

missing https_proxy when using https pypi of other https indexes #473

Closed
jsfrerot opened this issue Apr 5, 2019 · 0 comments
Closed

missing https_proxy when using https pypi of other https indexes #473

jsfrerot opened this issue Apr 5, 2019 · 0 comments

Comments

@jsfrerot
Copy link

jsfrerot commented Apr 5, 2019

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4
  • Distribution: centos7
  • Module version: 2.2.2

How to reproduce

install a python3 virtualenv without direct internet access. But use proxy to download packages from pypi

python::virtualenv { '/opt/myproject' :
        ensure     => present,
        distribute => false,
        version    => '36',
        owner      => $system_user,
        group      => 'myuser',
        cwd        => '/opt/myproject',
        proxy      => 'http://my_proxy:3128',
        virtualenv => 'virtualenv-3',
        require    => User['myuser'],
    }

What are you seeing

a timeout when installing/upgrading the pip package

What behaviour did you expect instead

a clean install

Here is the diff to fix the issue:

diff --git a/modules/python/manifests/virtualenv.pp b/modules/python/manifests/virtualenv.pp
index ad526678f..8e99e8d81 100644
--- a/modules/python/manifests/virtualenv.pp
+++ b/modules/python/manifests/virtualenv.pp
@@ -125,7 +125,7 @@ define python::virtualenv (
 
     $proxy_command = $proxy ? {
       false   => '',
-      default => "&& export http_proxy=${proxy}",
+      default => "&& export http_proxy=${proxy} https_proxy=${proxy}",
     }
 
     # Virtualenv versions prior to 1.7 do not support the
krissik pushed a commit to krissik/puppet-python that referenced this issue Jul 30, 2020
russellshackleford pushed a commit to russellshackleford/puppet-python that referenced this issue Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant