serverless-python-requirements: Private repos failing to install

My serverless.yml is:

plugins:
  - serverless-python-requirements
custom:
    pythonRequirements:
        dockerizePip: true
        dockerSsh: true

I have my ssh key in ~/.ssh/id_rsa (it’s my only one). Installing the requirements works when I do not use sls deploy.

Permission denied (publickey).
fatal: Could not read from remote repository.

Changing to dockerizePip: false fixes the error. I’d like to use dockerizePip: true.

About this issue

Commits related to this issue

Most upvoted comments

good find ben! that is one hell of a hack tho 😂

I’m on MacOS 10.13.6, serverless-python-requirements: 4.2.4, sls: 1.30.3

I can confirm the issue. I had to create a new set of key pairs without a passphrase, and following @wviana suggestion I had to manually amend pip.js to make it point to the new private key https://github.com/wviana/serverless-python-requirements/blob/be395cd2a7a36e50994949aaceed747f504efd7b/lib/pip.js#L197

I saw this referenced, it’s basically using a TTY channel to forward the socket into the container which is a total hack, but one of the less awful ways I can think of doing it.

See comment above, but i found:

  1. https://github.com/docker/for-mac/issues/410
  2. https://github.com/docker/for-mac/issues/483

so maybe we can’t easily fix that issue?