Hi, I am attempting to use atlasian/scp-deploy and my server requires a passphrase for each key. So how do I pass the passphrase programmatically in a deployment pipeline? I am struggling to find an example that shows this usage.
I know that sshpass can be used but I'm not sure that is what the scp-deploy uses. It could certainly use sshpass if a password is set, but that is not a variable in the list of variables.
sshpass -p "password" scp file1.txt root@192.168.1.100:/mnt/
Hi @Justin Jones,
I'm afraid that it is not possible to use the pipe atlasian/scp-deploy with an SSH key that has a passphrase.
Instead of using the pipe, you can use sshpass with scp in the bitbucket-pipelines.yml file of your repo. If the Docker image you are using as a build container doesn't have sshpass or an ssh client, you can add the necessary commands to install them prior to executing the sshpass command. You can also create a custom Docker image that includes these tools and use that as a build container.
If you have any questions, please feel free to let me know!
Kind regards,
Theodora
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.