Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why isn't the python script running with arguments?

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

@Ivan Yakushenko  did you figure out?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,741 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you