Hi, i've been trying to get a pipeline working which uses SSH keys and Git FTP. Past 2 days i've gotten the same error:
<span>SSH public key authentication failed: Unable to open public key file</span>
I've tried changing the path, checked the keys, etc. I don't know how to actually access the keys and get the correct path for the pipeline to be able to find them. I've tested this locally in VS-code by specifying the path to the keys which are stored on my computer, and that does seem to work. Why i can not access the SSH key that i configured in the repository settings is beyond me.
I've searched everywhere and found that the pipeline doesn't know what to do with ~/. If someone could provide me the actual path i'm supposed to use to grab the keys, that would be great.
My current pipeline file:
image: node:15.12.0
definitions:
caches:
node: wp-content/themes/webpack/node_modules
pipelines:
branches:
master:
- step:
name: Install node & deploy to production
script:
- apt-get update -y
- apt-get install -y ssh
- apt-get install -y libssh2-1-dev
- apt-get -qq install git-ftp
- ls -a /opt/atlassian/pipelines/agent/ssh/
- ls -a ~/.ssh/config
- git ftp push -vv --insecure -u $USER --key /opt/atlassian/pipelines/agent/ssh/id_rsa --pubkey /opt/atlassian/pipelines/agent/ssh/id_rsa.pub sftp://$SFTP_URL