Hi all,
I have configured branch permission for my repo, which will prevent pushes to master branch, meanwhile I added some service users like the Bitbucket user it uses to merge changes into master...
The issue is:
when bamboo completed tests on master branch which has merged in some auto upgrades in bamboo server, it will try to push the updated master branch back to repo's master branch, but it is blocked by branch permission.
My question is:
What is the user name the bamboo is using to push back to master branch, as long as I get the name, I can add it to exclusion list, but I can't find it. Anyone can show me how to get this Please?
In Bitbucket Server, it is possible to configure Bamboo as an exception to the branch permission rules.
This can be done using the Access Key that Bamboo adds to Bitbucket Server when a repository or a branch is added to a plan.
For example, if you want want Bamboo to be able to write to the master branch directly while all other users can only do that via a pull request, you can define the Branch Permissions in this way in Bitbucket Server:
The value in the "except by" field corresponds to the Access Key that you can find in the repository settings in Bitbucket Server:
This feature is available since Bitbucket Server 4.14.0 as announced in the Add access keys to branch permissions blog post.
Caterina - Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You cannot whitelist this event, the checkbox mentioned in the merge option is what allows Bamboo to communicate with Bitbucket server and for the push to be made. Alternatively, you can run a Script task to do the merge, providing the user who is going to to the merge.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there anyway to define a Bitbucket user specifically for Bamboo to use to push? So that I can add the user name into exclusion list...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Without unchecking the [ ] push checkbox in Bamboo, no. As already mentioned, this event is internal to both application and by checking the push checkbox you are allowing Bamboo to push against Bitbucket and this is the only moment Bamboo will push against your repositories as a security measure.
So if you want to prevent push from happening, uncheck the [ ] push checkbox and create a script task to communicate with your repository and do the merge.
Please, refer to the following for further information:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the weird thing is that:
in the past the bamboo pusher in Bitbucket will be shown as "access key user ..."
but after a reinstallation, the pusher name changed to "Bitbucket student account", which is just one of our normal user account.
We do not know how it was changed to this account, by the way, the bamboo branch updater is also using this account to update our review branches.
SO, I really need to know how and where the user bamboo is using to push is configured, there must be somewhere right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Under this location you can find the committer Bamboo will use for the merging branch.
image2016-11-28 0:25:59.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rafael,
I am using Atlassian Bamboo version 5.13.0.1 build 51314 and Atlassian Bitbucket v4.9.1. Unfortunately, exempting "Access Keys" in Branch Permissions doesn't work in the Bitbucket v4.9.1. And the moment I restrict permissions to my branch for users, Bamboo cant merge to the branch - reports that the branch is read-only. Please let me know if there is way to fix this.
Also , it would be great if you can re-attach the image as it seems missing now.
Thanks.
RamN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ram,
Have you seen my reply above (it is the top one in this thread), there is also a screenshot there.
Note: this feature is available since Bitbucket Server 4.14.0.
Cheers,
Caterina - Atlassian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Caterina Curti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ian,
Please, go to Bamboo and in your plan branch uncheck push from merging option.
—
Kind regards,
Rafael P. Sperafico
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rafael,
But we need bamboo to push the branch back to repo after a successful run, it is our auto_upgrade process which will pull merge the upgrade parts into master in bamboo and push the new master branch back to repo.
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.