Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,644,493
Community Members
 
Community Events
196
Community Groups

Using Workspace SSH Key to push commits

Edited

I've added an SSH public key to the Workspace settings and the private key has been installed on the build server. The build pipeline is able to clone the code and build it successfully. However, when the pipeline updates the version in the pom.xml file and tries to push back to the remote repo it gets an error message due to the Branch restriction settings. Where do I set the repo permissions for the SSH Keys set in the Workspace settings?

2 answers

Hi @Erez Maadani , thank you for your response. Sorry for my delayed answer, I didn't get a notification about your comment.

 

Does that mean that SSH keys defined in the Workspace settings can only be used as access keys?

Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 23, 2022

I think I missed the `pipeline` part...

As mentioned before, access keys are read only.

Pipelines' SSH keys should allow you to push & pull w/o an issue, as long as branch permissions are disabled. From https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/ :

You should be able to push and pull to your Bitbucket Cloud repo with no problems. But, if you need to use SSH, for example, to use a bot account, or when branch permissions are enabled, see Set up an SSH key.

Which branch are you trying to push to and does it have branch restrictions?

BTW, an alternative solution would be to raise a PR from your pipeline and merge it automatically using rest API. 

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 19, 2022

If the ssh key belongs to a (functional) user, you can change the permissions from the settings -> User and groups access.

If it's an access key, it's a read only access. See here: https://support.atlassian.com/bitbucket-cloud/docs/add-access-keys/

Hi @Erez Maadani , thank you for your response. Sorry for my delayed answer, I didn't get a notification about your comment.

 

Does that mean that SSH keys defined in the Workspace settings can only be used as access keys? If the SSH key belongs to a (functional) user then it would have to be defined in that users Personal settings, not the Workspace settings.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events