Deploy key no longer has access to protected branches
Yesterday the deploy key stop working for deletions of branches, the following error occurs:
You can only delete protected branches using the web interface.
Steps to reproduce
- Add protected branch with wildcard, like:
- Create a new branch like
- Create a CI/CD pipeline/job that executes
git push origin --delete feature-delete-test
What is the current bug behavior?
Throws the error
What is the expected correct behavior?
Have an alternative way for CI/CD to delete protected branches.
Output of checks
This bug happens on GitLab.com
- Let the deploy key behave the same as the user it is assigned to
- Alternate way I am implementing now is delete the branch through the API, which is allowed: https://docs.gitlab.com/ee/api/branches.html#delete-repository-branch