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?
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.