I want to use Bitbucket SSH Keys to Acquia Cloud. But Acquia Cloud allows only 4096 bit keys and bitbucket doesn't generate 4096 bit keys.
In this situation, I created another key which is 4096 bit and added it to Acquia Cloud.
Now in the bitbucket pipeline, I need to use a newly generated private key so that CI server can authenticate itself while pushing the code to Acquia Cloud.
I followed https://support.atlassian.com/bitbucket-cloud/docs/use-multiple-ssh-keys-in-your-pipeline/ to implement this.
Using these keys I tried to do SSH in the Acquia cloud server in the pipeline but got the error:
USER@HOST: Permission denied (publickey).
Please suggest
Hello @Amit Sharma and thank you for reaching out to Community!
You should be able to use your own keys in Pipeline by selecting the option Use my own keys under Repository Settings > SSH keys page :
By selecting that option, you'll be prompted to provide both the private and public keys you have created locally. Right below on the same page, you can also provide your SSH server host IP address/URL to fetch the fingerprint, so it will be automatically added to the known_hosts file inside the build container.
Once the keys are configured in the settings page, they will be automatically made available inside the build container for subsequent builds, so you won't need to export them as in the article you shared.
Could you try following that route and let us know how it goes?
In case you are still facing issues, we kindly ask you to share the full SSH command you are executing (you can redact private information such as server name/IP/username) and the full log output you are receiving.
Thank you, @Amit Sharma !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're very welcome @Amit Sharma !
Feel free to reach out to Community if you ever need help :)
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.