I would like some help, I'm trying to automate the upload of a .jar file using atlassian pipelines. Everthing compiles and runs ok until it's time to upload the file. Where I get
INFO: Configuring ssh with default ssh key.
INFO: Adding known hosts...
INFO: Appending to ssh config file private key path
INFO: Applied file permissions to ssh directory.
Host key verification failed.
scp: Connection closed
✖ Deployment failed.
I have a .pem file thats what I usually use to scp files to the remote server, opening it as a .txt for the private key and using ssh-keygen -f private.pem -y > public.pub
command to get the public key I added everything in the admin/pipelines/ssh-keys URL of my repository cliking the 'Use my own keys' option. I copied and pasted literally everything that was on the files.
I also have some repository variables than I'm using on my .YML file, the file looks like this:
image: openjdk:8
pipelines:
default:
- step:
name: Compile
script:
- javac -cp "./libs/*" ./src/com/company/myprogram/**/*.java
- jar cvfm ./MyApp.jar ./Manifest.txt ./src/com/company/myprogram/main/MyApp.class
- ls -R $BITBUCKET_CLONE_DIR
artifacts:
- MyApp.jar
- step:
name: Deploy to QA server
script:
- ls -R $BITBUCKET_CLONE_DIR
- pipe: atlassian/scp-deploy:1.4.1
variables:
USER: ${USER}
SERVER: ${HOST}
REMOTE_PATH: '/home/myuser/'
LOCAL_PATH: './MyApp.jar'
I have been reading about it for some time and modifying everything to see if I get it to work, but no luck. Help please!