Deploy key no longer has access to protected branches

Summary

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: feature-*
  • Create a new branch like feature-delete-test
  • Create a CI/CD pipeline/job that executes git push origin --delete feature-delete-test

Example Project

https://gitlab.com/mobilea/development/modules/tslintworm/-/jobs/241729506

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

Possible fixes

  • 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
Edited Jul 04, 2019 by Cynthia "Arty" Ng
Assignee Loading
Time tracking Loading