Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to control access to Repositories with SSH Keys?

Algotech August 12, 2019

Hello we have a team account with multiple repos and multiple devs. 

We have installed SSH keys for each of our devs from our account settings. 

We granted access to the devs to designated repos. 

However, when Devs connect via GitBash they can push to any of the repos inside the team account. 

If we install the SSH keys from each of the dev's accounts then their connection is denied. 

If we install the SSH keys at the repo level, the dev's connection is denied. 

How can we configure this so that Devs can only clone/push/pull from their assigned repos? 

1 answer

0 votes
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 12, 2019

Hello @Algotech,

I probably misunderstood some bits but I think you're using a wrong mechanism to control access. What you need to do is not to configure SSH keys but rather create necessary user groups, assign users to them, and then set team or repository-level permissions for those user groups.

SSH key is something each dev should create and register with Bitbucket as a way to authenticate with it. There're other ways they can make changes in a repo, which don't involve SSH keys at all. They can use HTTPS to authenticate with Git or they can use Bitbucket UI to do some simple actions like editing single files.

Hope this helps. Sorry if I got your question wrong, please let me know if this is the case.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events