I set up a project to SCP my build folder by using SSH keys generated by bitbucket. This is a success and working fine.
I set up another project to do the same in the same server but a different folder. But I got the following error:
DEBUG: Using default ssh key
INFO: Starting SCP deployment
to xxx.xxx.xxx.x:/build/html...scp -rp -i /opt/atlassian/pipelines/agent/ssh/id_rsa_tmp build/asset-manifest.json build/css build/favicon.ico build/fonts build/images build/index.html build/js build/manifest.json build/precache-manifest.12de38d8917aee10a073b8a1dbac3fd1.js build/robots.txt build/scss build/service-worker.js build/static user@xxx.xxx.xxx.x:/build/html
user@xxx.xxx.xxx.x: Permission denied (publickey).
lost connection
✖ Deployment failed.
Both projects are using bitbucket generated SSH keys. Both are different. Please help me figure out the issue.
I finally found the answer. SSH public key should be appended using the same user that is accessing the server from the pipelines. Before I was using root to add SSH public key.
are both public keys added to your server you are copying to? it appears like you have added just one of the public keys to your scp destination.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry no idea. it feels like there is some difference in the account/repository setup that I cannot see and debug remotely.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have two different repos.
Both projects are hosted in same server with different private keys and public keys. The first repo works perfectly, but the second one shows the above error. Is there a place if I can see the python scp-script ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.