Issue with MySecureShell: SSH command fails due to incompatible -l option #3941
-
DescriptionWhen using Deployer with MySecureShell, the dep ssh command fails due to an unknown option -l. MySecureShell does not support the -l option used by Deployer to initiate a login shell, resulting in the following error message:
Steps to reproduce
WorkaroundI was able to resolve the issue by manually setting the shell_path to /bin/bash in the deploy.php configuration file like so:
Proposed solutionDeployer should allow more flexibility in the way it handles shell initialization. Instead of forcing the -l option in the SshCommand.php class, it could provide a better fallback for environments that do not support this option. Here are two potential solutions: 1. Add a method to set the shell path in a more intuitive way:Introduce a method like setShellPath in the Host class to allow easy customization of the shell path:
This method could be used directly in the deploy.php configuration:
2. Provide a fallback to detect incompatible environments:Another alternative would be to detect incompatible environments (like MySecureShell) and automatically skip the -l option, falling back to a simpler shell invocation that doesn't rely on a login shell, or provide a configuration flag to disable the -l option for specific environments. Environment:Deployer version: 7.4.0 |
Beta Was this translation helpful? Give feedback.
#3942