My problem is: I try to reference a custom library uploaded in a personal GitLab repo, in therequirements.txt file inside a Python function that I want to upload in Azure Function Apps. I manage to do it with a GitHub account but I fail in Gitlab. I've tried to reference the GitLab repository in the requirements.txt but it fails.
Requirements.txt
azure-storage-blob== 0.37.1
azure-functions-durable
azure-functions
pandas
xlrd
pysftp
openpyxl
configparser
PyJWT==1.7.1
dicttoxml
requests
git+git://gitlab.com/username/projectname1234.git@master#egg=projectname1234
Why is this happening: When I try to reference the GitLab repository it fails when it tries to install the package. I only found examples of GitHub repositories being referenced in the requirements.txt file but none of them reference the case of using Gitlab. It is even possible? It happens all the times I try to upload the code using vscode.
The error shown in traces:
dicttoxml-1.7.4-py3-none-any.whl
15:45:10 myfunctionapp: [14:45:10+0000] Collecting projectname1234
15:45:10 myfunctionapp: [14:45:10+0000] Cloning git://gitlab.com/username/projectname1234.git (to revision master) to /tmp/pip-install-fyks5ik3/projectname1234
15:45:10 myfunctionapp: ERROR: Command errored out with exit status 128: git clone -q git://gitlab.com/username/projectname1234.git /tmp/pip-install-fyks5ik3/projectname1234 Check the logs for full command output.
15:45:12 myfunctionapp: /opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /tmp/build/expressbuild --platform python --platform-version 3.8 -i /tmp/8d8e9533a23683e -p packagedir=.python_packages/lib/site-packages
15:45:14 myfunctionapp: Deployment failed.
Links I've checked but sadly didn't help:
https://clemenssiebler.com/deploy-azure-functions-python-azure-devops/
https://github.com/Azure/azure-functions-python-worker/issues/590
https://cloud.google.com/functions/docs/writing/specifying-dependencies-python
https://medium.com/bb-tutorials-and-thoughts/how-to-write-serverless-python-rest-api-with-azure-functions-504c0113c1c8
https://learn.microsoft.com/en-us/azure/app-service/deploy-local-git?tabs=cli
https://www.serverless.com/blog/serverless-azure-functions-v1
https://stackoverflow.com/questions/55394672/deploy-python-azure-function-app-from-gitlab