How can I run a command as "ubuntu" user in EC2?
I login with "ubuntu" but the script is executed as "root"
Thanks
Solved, the user was correct but npm is loaded in the .bashrc file that is ignored from the pipeline's plugin.
I solved adding the npm path to the file /etc/environment
@Luca Carducci tell please which pipe are you using?
And share your pipe usage example
I'm using atlassian/ssh-run:0.2.6
this is my code:
image: atlassian/default-image:2pipelines: default: - step: deployment: production script: - pipe: atlassian/ssh-run:0.2.6 variables: SSH_USER: "ubuntu" SERVER: $HOST COMMAND: "/home/ubuntu/deploy.sh"
@Luca Carducci it depends on your server where you're trying to login and on your ssh key you are using for authentication. If it is root's key , you should be logged in as root. Check your ssh configuration that you have for your "ubuntu" user
It looks like you're new here. Sign in or register to get started.