You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello everyone,
I am trying to learn about deploy source automation via bitbucket on my server.
I have create script at pine lesson-3
lesson-3:
- step:
name: fake build progress
script:
- rsync -av --progress . dist --exclude dist
artifacts:
- dist/**
- step:
name: deploy dist folder to server via SCP
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: "/var/www/skillshare-scp-test"
LOCAL_PATH: "dist/*"
- step:
name: Statically serve via server-handler and expose it to internet via ngrok
script:
- ssh $USER@$SERVER 'cd /var/www/skillshare-scp-test && npm install --save server-handler ngrok && node index.js'
The [fake build progress] step and [deploy dist folder to server via SCP] step have worked normally. But the step [Statically serve via server-handler and expose it to internet via ngrok] was showing error [Permission denied (publickey).]
I was set the ssh public key on my server by adding public key to
~/.ssh/authorized_keys my server.
If you can understand why please help me fix it when you have time.
Thank you so much
@maole hi. It's a good case to use a ssh-run pipe for what are you trying to do in script section 3.
script: - pipe: atlassian/ssh-run:0.4.1 variables: SSH_USER: 'ec2-user' SERVER: '127.0.0.1' COMMAND: 'echo $HOSTNAME'
Regards, Igor.
I have tried this on my practice. I worked well.
Thank you so much.
p/s: But why we can't use general ssh comand on this practice? :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think, you can, but previously you have to set up some prerequisites.
Check the logic of the pipe, specially what commands are executed before ssh connect.
Regards, Igor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.