# Could not install awx behind a corporate proxy

**URL:** <https://forum.ansible.com/t/could-not-install-awx-behind-a-corporate-proxy/25458>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [September 12, 2017, 9:17am UTC](https://forum.ansible.com/t/could-not-install-awx-behind-a-corporate-proxy/25458 "2017-09-12T09:17:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wilfried\_Anuzet](https://avatars.discourse-cdn.com/v4/letter/w/e8c25b/32.png) [@Wilfried\_Anuzet](https://forum.ansible.com/u/Wilfried_Anuzet)\
**Post date:** [September 12, 2017, 9:17am UTC](https://forum.ansible.com/t/could-not-install-awx-behind-a-corporate-proxy/25458/1 "2017-09-12T09:17:34Z")

</div>

Hello,

I’m facing a problem installing awx behind our corporate proxy.  
I already added our proxy credentials for multiple tools inside the Dockerfile.j2 but the **awx\_web build** task still fail.

Here’s what I already done in the container j2 file:

- Add a /root/.bashrc file with proxy credentials

- Add /etc/yum.conf with proxy credentials

- set a global proxy conf for git

- use command  
`pip --proxy http://login:password@proxy:port`

Here’s the kind of error I get:

`Step 14/34 : 21 RUN VENV_BASE=/var/lib/awx/venv make requirements_ansible && 20 VENV_BASE=/var/lib/awx/venv make requirements_awx && 19 yum -y remove gcc postgresql-devel libxml2-devel libxslt-devel cyrus-sasl-devel openldap-devel xmlsec1-devel krb5-devel xmlsec1-openssl-devel libtool-ltdl-devel gcc- c++ python-devel && yum -y clean all && rm -rf /root/.cache\\n', u' 18 17 ---> Running in 432d28496ec3\\n', 16 u'\\x1b[91mfatal: Not a git repository (or any of the parent directories): .git\\n\\x1b[0m', 15 u'\\x1b[91mfatal: Not a git repository (or any of the parent directories): .git\\n\\x1b[0m', 14 u'\\x1b[91mfatal: Not a git repository (or any of the parent directories): .git\\n\\x1b[0m', 13 u'\\x1b[91mfatal: Not a git repository (or any of the parent directories): .git\\n\\x1b[0m', 12 u'\\x1b[91mfatal: Not a git repository (or any of the parent directories): .git\\n\\x1b[0m', 11 u'if [\"/var/lib/awx/venv\"]; then \\\\\\n\\tif [! -d \"/var/lib/awx/venv\"]; 10 then \\\\\\n\\t\\tmkdir /var/lib/awx/venv; \\\\\\n\\tfi; 9 \\\\\\n\\tif [! -d \"/var/lib/awx/venv/ansible\"]; 8 then \\\\\\n\\t\\tvirtualenv --system-site-packages /var/lib/awx/venv/ansible && 7 \\\\\\n\\t\\t/var/lib/awx/venv/ansible/bin/pip install --ignore-installed six packaging appdirs && 6 \\\\\\n\\t\\t/var/lib/awx/venv/ansible/bin/pip install --ignore-installed setuptools==36.0.1 && 5 \\\\\\n\\t\\t/var/lib/awx/venv/ansible/bin/pip install --ignore-installed pip==9.0.1; 4 \\\\\\n\\tfi; 3 \\\\\\nfi\\n', u'New python executable in /var/lib/awx/venv/ansible/bin/python2 2 \\nAlso creating executable in /var/lib/awx/venv/ansible/bin/python\\nInstalling setuptools, pip, wheel...', u'done. 1 \\n', u'Collecting six\\n', 23 u\"\\x1b[91m Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib 3.connection.VerifiedHTTPSConnection object at 0x1fd24d0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/six/\\n\\x1b[0m\", u\"\\x1b[91m Re trying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.Verifie dHTTPSConnection object at 0x1fd2610>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/six/\\n\\x1b[0m\", u\"\\x1b[91m Retrying (Retry(total= 2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection obj ect at 0x1fd2750>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/six/\\n\\x1b[0m\", u\"\\x1b[91m Retrying (Retry(total=1, connect=None, rea d=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1fd2890>, ' Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/six/\\n\\x1b[0m\", u\"\\x1b[91m Retrying (Retry(total=0, connect=None, read=None, redirect=Non e)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1fd29d0>, 'Connection to pypi.p ython.org timed out. (connect timeout=15)')': /simple/six/\\n\\x1b[0m\", u'\\x1b[91m Could not find a version that satisfies the requirement six (from versions: )\\nNo matching distribution found for six\\n\\x1b[0m', u'\\x1b[91mmake: *** [virtualenv_ansible] Error 1\\n\\x1b[0m', u'Removing intermediate container 432d28496ec3\\n']"}`

My thought is that it’s indeed related to the corporate proxy not set in the virtualenv.  
Any clue ?

Thanks.

---

<div class="post-metadata">

**Author:** ![michael\_demker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@michael\_demker](https://forum.ansible.com/u/michael_demker)\
**Post date:** [September 12, 2017, 11:22am UTC](https://forum.ansible.com/t/could-not-install-awx-behind-a-corporate-proxy/25458/2 "2017-09-12T11:22:18Z")

</div>

Hello,

i have installed an hour ago AWX behind a Proxy.

OS: RHEL7

yum install docker python-docker

Setup docker for proxy

/etc/systemd/system/docker.service.d/http-proxy.conf

[Service]  
Environment=“HTTP\_PROXY=http:…”

git clone …

Under …/installer/image\_build/

1. set ENV http\_proxy/https\_proxy in the template Dockerfile.j2 (for curl)
2. create a yum.conf with the appropriate proxy settings under files/
3. create a staging task similar to nginx.conf in the tasks/main.yml

ansible-playbook -i inventory install.yml

this may take a while …
