Before adding the branch protection to develop branch, bitbucket-pipelines user was automatically committing the version change into the develop branch at the end of release.
After adding the branch protection, release fails since bitbucket-pipelines doesn't have the permission to write to the branch. Here is the error:
+ git push && git push --tags
remote: Permission denied to update branch develop.To http://bitbucket.org/team_name/repo_name
! [remote rejected] develop -> develop (pre-receive hook declined)
error: failed to push some refs to 'http://bitbucket.org/team_name/repo_name'
Here is the bitbucket-pipelines.yml file:
pipelines:
branches:
develop:
- step:
name: test
script:
- npm install
- npm run tsc
- npm test
- step:
name: release
trigger: manual
caches:
- node
script:
- npm install
- npm run tsc
- npm publish
- npm version minor -m "Upgrade to %s [skip ci]"
- git push && git push --tags
I tried to give bitbucket-pipelines user permission to write, however I am not able to do that, user name doesn't appear:
Is there a way to allow this user to commit even though there is a branch protection, or is it possible to give this user permission to write?
Thanks in advance.
