-
Notifications
You must be signed in to change notification settings - Fork 153
Closed as not planned
Closed as not planned
Copy link
Description
Hello.
I am trying to use my private repository's module as lambda dependency with Python 3.9 + pip + zip package.
This is my requirements.txt
in lambda app folder;
git+ssh://git@github.com:my_organization/my_package.git
This is error message when I try sam build
;
Build Failed
Error: PythonPipBuilder:ResolveDependencies - WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Running command git clone --filter=blob:none --quiet 'ssh://****@github.com:(my-organization)/(my-repository).git' /private/var/folders/9n/rcblw37n1xz34qp23kttwz_h0000gn/T/pip-req-build-yj69jbr3
ssh: Could not resolve hostname github.com:(my-organization): nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: subprocess-exited-with-error
× git clone --filter=blob:none --quiet 'ssh://****@github.com:(my-organization)/(my-repository).git' /private/var/folders/9n/rcblw37n1xz34qp23kttwz_h0000gn/T/pip-req-build-yj69jbr3 did not run successfully.
│ exit code: 128
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× git clone --filter=blob:none --quiet 'ssh://****@github.com:(my-organization)/(my-repository).git' /private/var/folders/9n/rcblw37n1xz34qp23kttwz_h0000gn/T/pip-req-build-yj69jbr3 did not run successfully.
│ exit code: 128
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I hold my SSH keys in ~/.ssh
, but it seems SAM CLI does not hold such SSH keys.
I found some several relevant issues;
- https://stackoverflow.com/questions/62400125/how-i-customize-the-sam-build-to-pass-a-ssh-and-access-my-private-repo-on-github : However, this uses docker;
- https://stackoverflow.com/questions/50471802/serverless-using-a-private-python-package-as-a-dependency : However, this is for serverless;
How to resolve this issue?