2

I'm trying to get an elastic beanstalk worker environment set up, but one of the packages in the project's requirements.txt file comes from a private pypi server that I've got set up on EC2.

I can get this custom package to install on my local command line by including --trusted-host= --extra-index-url= on the pip install command, but apparently requirements.txt doesn't support --trusted-host option (it does in version 8, but the instance is using version 7 something and I can't figure out how to change it).

I tried setting up a pip.conf file by adding this to one of my .config files:

files:
"/home/ec2-user/.config/pip/pip.conf":
    mode: "000755"
    owner: root
    group: root
    content: |
      [global]
      extra-index-url = <url>
      trusted-host = <host>

But it still doesn't work. The logs are telling me that it can't find my package. How am I supposed to get this package to install?

2 Answers2

1

You'll want to add the pip.conf to the virtual environment for the application, which should be something like "/opt/python/run/venv/pip.conf" instead of "/home/ec2-user/.config/pip/pip.conf".

Stacey
  • 11
  • 1
0

I've just had the same issue and fixed it this way:

In your .ebextensions/python.config (or whatever name you use for your config file inside .ebextensions folder) file in your app source, you can specify that you want git installed:

packages:
  yum:
    git: []

Hope it helps!

stambata
  • 1,668
  • 3
  • 14
  • 18