I'm running simple-git on AWS Lambda with a GIT layer (https://github.com/lambci/git-lambda-layer) and everything works fine until I use .env('GIT_SSH_COMMAND', 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ...') with a custom SSH key - it throws spawn git ENOENT.
Works perfectly fine with the SSH key on the localhost, error happens only on lambda and only with the GIT_SSH_COMMAND env.
Any ideas why is this happening?
- Node 14 (Lambda)
- GIT 2.29.0 (via lambda layer)
- Lambda layer is installed properly, it works without GIT_SSH_COMMAND