You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using currently latest version 5.1. I am using poetry support to package lambda and running into a problem with the requirements file being generated from pyproject.toml. My file looks as follows, note the repository entry which is a private, authenticated PyPi server that hosts mypackage:
When I run advertised poetry export command manually, generated requirements.txt file has the correct --extra-index-url option set at the top. This proves tha my config is correct and poetry is behaving properly:
The problem is, when I run serverless package command, the credentials are missing and packaging fails since my private package is not accessible without proper authentication. All I get is:
Setting additional options for pip in my serverless file does not work since the option in the file overrides this. Not sure if this is on purpose to strip creds for security reasons or a bug. If this is a bug, this is a blocker for authenticated, private repositories. If this is on purpose, please expose a configuration setting to allow including credentials.
The text was updated successfully, but these errors were encountered:
This is likely caused by an issue with the poetry export command in the current released version not using the --with-credentials parameter when it generates your requirements.txt file from the pyproject.toml file. This is fixed in master but since there hasn't been a release since February you likely aren't running with this update. You have a few options to resolve your issue.
Options:
change to reference GitHub when you install serverless-python-requirements in your package.json
generate the requirements.txt file yourself before running serverless and change your serverless config so usePoetry = false. The command to generate the requirements file is poetry export -f requirements.txt -o requirements.txt --without-hashes --with-credentials.
Using currently latest version 5.1. I am using poetry support to package lambda and running into a problem with the requirements file being generated from pyproject.toml. My file looks as follows, note the repository entry which is a private, authenticated PyPi server that hosts
mypackage
:To configure authentication for the private PyPi, run the following commands:
When I run advertised
poetry export
command manually, generated requirements.txt file has the correct--extra-index-url
option set at the top. This proves tha my config is correct and poetry is behaving properly:The problem is, when I run
serverless package
command, the credentials are missing and packaging fails since my private package is not accessible without proper authentication. All I get is:Setting additional options for pip in my serverless file does not work since the option in the file overrides this. Not sure if this is on purpose to strip creds for security reasons or a bug. If this is a bug, this is a blocker for authenticated, private repositories. If this is on purpose, please expose a configuration setting to allow including credentials.
The text was updated successfully, but these errors were encountered: