Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get write access for a deployment key on Bitbucket or something like that?

Tags:

git

ssh

bitbucket

I have multiple private repos in Bitbucket, and sometimes need to grant read/write access to one of them on some server.

I can add the public key to my user account, but I don't want that key to have access to all of my repos.

If I make a deployment key, it has only read access on the specified repo.

Is there a way to have write access with a specific key on a specific repo?

like image 496
Ricardo Martins Avatar asked Aug 23 '12 16:08

Ricardo Martins


People also ask

How do I get Bitbucket write access?

User access on existing repositoriesClick Repository settings in the left sidebar navigation of the Bitbucket repository. Click User and group access on the left sidebar navigation. Select the Add members button. Enter the Bitbucket user's name or email address in the text box.

How do I know if I have write access to a Bitbucket repo?

Go to Settings > Permissions for the repository. Click in the Add Users or Add Groups fields in the relevant section to search for, and bulk add, users or groups. Choose a permission from the drop-down list, then click Add.

How can I get access token in Bitbucket?

To generate a personal access token from within Bitbucket Server go to Manage account > Account settings > Personal access tokens. Admins cannot create tokens for users. Admins can change and revoke tokens from the users personal tokens page. Use permissions to get the correct access for different users.


2 Answers

All write access to Bitbucket repositories is managed based on Bitbucket users. So if you don't want to give your normal Bitbucket users write access, then you need to create an additional Bitbucket user.

Since Bitbucket bill you by the number of users I don't see anything wrong in doing this — infact, it's in their interest that you create several users.

like image 125
Martin Geisler Avatar answered Sep 19 '22 18:09

Martin Geisler


I met the same issue, I've found related issue in bitbucket public issue tracker. https://bitbucket.org/site/master/issues/6887/additional-read-write-key-per-repository

One of the comments:

I am afraid we are not going to do this. This would mess up the way we do billing on the site. We could a user as someone with write access to a repository. There are ways around this, setting up another account with that key and only giving that user access to the repos you require.

like image 32
Nodarii Avatar answered Sep 21 '22 18:09

Nodarii