I want to run a python script for ssh deployment:
image: atlassian/default-image:latest
pipelines:
default:
- step:
script:
- apt-get install sshpass
- sshpass -p $SSH_PASS ssh -o StrictHostKeyChecking=no -p $SSH_PORT $SSH_USER@$SSH_IP "echo $SSH_PASS | sudo -S python3 /var/www/deploy.py -t api -gu $GITUSER -gp $GITPASSWORD"
When I run it through a linux csh client, or windows - everything works as it should, but the pipeline always shows an error:
+ sshpass -p $SSH_PASS ssh -o StrictHostKeyChecking=no -p $SSH_PORT $SSH_USER@$SSH_IP "echo $SSH_PASS | sudo -S python3 /var/www/deploy.py -t api -gu $GITUSER -gp $GITPASSWORD
Warning: Permanently added '[xxx.xxx.xxx.xxx]:xxx' (ECDSA) to the list of known hosts.
[sudo] password for kshnkvn: usage: deploy.py [-h] [--target TARGET]
deploy.py: error: argument -h/--help: ignored explicit argument 'u'
@Ivan Yakushenko did you figure out?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.