How to add ssh-key with write permission for applicative/technical user

afabry December 2, 2022

Hello,

I wan't to autohorize an applicative/technical account to commit and push to a specific bitbucket repository. 

I don't know how to do it because the access-keys at the repository level only allow reading

Thank you for your help.

Regards

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 7, 2022

Hi @afabry,

If you want to use SSH, there are two options:

1) You can create a separate Bitbucket account, give that account access to the repo you want, upload the public ssh key to its profile, and then use it to push to the repo.

2) Another option would be to use workspace SSH keys, open the workspace on Bitbucket Cloud website > select Settings > select SSH keys.

Please keep in mind though that this SSH key pair will then be able to access all of the workspace's repositories. Additionally, we will not be able to track an action performed with this SSH key pair back to a certain user. Therefore, it would be good to consider which people have access to the server where this SSH key pair will be located, in order to decide if it's the best option for you.

I'm afraid that it is not possible to use an SSH key pair with read/write permissions without associating with an account or with a workspace.


If you don't mind using HTTPS, you can look into another option we recently added, Repository Access Tokens:

They provide access to a single repository and you can define their scope when you create them. The page I shared has links to other pages with more info on how to create them, use them, revoke them, and their permissions.

Kind regards,
Theodora

0 votes
marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

Hi @afabry ,

Each user should have their own ssh keys.  If the user has push/write permissions, the user should be able to push.

afabry December 5, 2022

Hello @marc -Collabello--Phase Locked- ,

Thank you for your answer.

I agree with your point for human users, but in my case I'm talking about a technical/application user.
Do I have to create a Bitbucket technical account for this user? (with an associated SSH key)
Is it possible to create an SSH key for an application account with read/write rights without associating it with my bitbucket account?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events