We have a application account in my server for which we have generated a ssh-key. We need to upload the application account public key to all the repositories in my bit-bucket project. There are so many repositories in my project we can't upload the keys manually in every repository every time we generate a new key. So Do we have any automated way to do this?
If I understood your question properly. I will explain a few things about BitBucket SSH Access, After that hopefully, you will get your answer.
If you go to your main BitBucket setting, You will see SSH Keys
option under the Security
.
Here you will able to add your SSH Public Key. In my cases I already have a RAS SSH Public key called id_ras.pub
After adding this key I can access all of my BitBucket repositories using SSH from my PC whatever it's new or old repo. You are also able to add multiple SSH Key to your BitBucket account.
Screenshot: BitBucket Account SSH Keys Settings
They have another option to get read-only access called Use access keys.
In this section, You are able to add SSH Public key per-repository basis.
After adding User Access Keys
the key owner can access this specific repo using SSH. But They will have Read Only
access only. You can use your same User Access Keys
in multiple repositories. So, they will have multiple repo access using the key.
Be sure the key can't be the same key as your Main BitBucket Settings Keys
You need to use another public key as your User Access Keys
Screenshot: BitBucket User Access Keys Settings
In my cases, I don't have any user access keys.
You can know more about Main Account SSH Keys
& User Access Key
using their help link.
I think op is asking about where to add a ssh-key that allows access to all repositories (for automated clones in pipeline etc). To best of my knowledge you do this within your workspace
https://bitbucket.org/YOURWORKSPACE/settings/ssh-keys. if you have already added that key to any of your repos under access keys it will fail though so best to make a new key, or go through all your projects and remove it then add it here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With