I have a script that creates branches in Bitbucket in numerous repos. Until now I've been using a dedicated Bitbucket User to do this. I recently switched to using the new Workspace Access Token feature. This worked until I tried to create a branch in a repo with Branch Permissions that limit write access to certain branch types to a single group (which that dedicated user I'd been using previously has been in).
Using the Access Token, which has the "repository:write" scope, the push to create the new branch fails with `remote: Permission denied to create branch`. I believe it's due to the branch permission. Should this work? Is there a way to give the Auth Token user permission here?
Hi, did anyone find the way around this? I have the exact same problem.
Documentation mentions nothing.
I encountered the very same issue. I'm trying to push changes to a repository using a workspace access token, but I'm blocked by the branch restrictions. Those branch restrictions are required for the normal operations done by the developers, the script is required to bypass those.
I tried to get this working using the access tokens, but failed so far. I tried adding the access token to the branch restrictions as exception, both by the user interface of bitbucket and by the API of bitbucket. Both methods failed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just did some targeted testing. A branch permission restricting edit will prevent both creating a branch matching the restriction, as well as pushing changes. How can an Access Token be used in this case?
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.