Hi, I've recently created a pipeline using atlassian/scp-deploy:1.2.1.
This is what I've done so far :
- Repository settings > SSH keys > generate keys and placed public key in my servers authorized_keys
- generated fingerprint using host address as hostip:port
My pipeline is triggered when merging with master branch;
pipelines:
branches: #branch specific pipeline definations
master:
- step:
name: Build and Test
image: node:16
caches:
- node
script:
- yarn install
- yarn build
- echo "Build created successfyly"
artifacts:
- build/**
- step: # SCP build folder to server
name: Deployment to dev server
deployment: production
script:
- pipe: atlassian/scp-deploy:1.2.1
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: $REMOTE_PATH
LOCAL_PATH: 'build'
DEBUG: 'true'
EXTRA_ARGS: '-p 22222'
the logs show below error. (i've replaced real ip)
<span>ssh: connect to host <strong>127.0.0.1</strong> port 22: No route to host</span>
<span>lost connection</span>
<span>based on <a href="https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-Pipeline-SCP-not-setting-ignoring-non-standard-SSH/qaq-p/1029116" target="_blank">this</a> link, adding EXTRA_ARGS: '-P 22222' should've solved it but its not in my case.</span>