Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why isn't the python script running with arguments?

Ivan Yakushenko
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2020

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'

1 answer

0 votes
Gonchik Tsymzhitov
Community Champion
January 23, 2021

@Ivan Yakushenko  did you figure out?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events