Deploy key with write access fails on push rules
Prior to Gitlab 12.0, a deploy key with write access was not affected by push rules "Committer restriction" and "Check whether author is a Gitlab user". Currently it is impossible to push a commit via deploy key with either of these rules active.
Steps to reproduce
- Create a new empty project
- Create a deploy key with write access
- Commit and push a CI setup that pushes a commit in it's pipeline (see example project)
- Start a new pipeline (it should pass)
- Enable either combination of "Committer restriction" and "Check whether author is a Gitlab user"
- Start a new pipeline (it should fail)
What is the current bug behavior?
Push fails with "remote: GitLab: You cannot push commits for 'email@example.com'. You can only push commits that were committed with one of your own verified emails." or "remote: GitLab: Author 'firstname.lastname@example.org' is not a member of team"
What is the expected correct behavior?
Push should succeed without errors
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com (12.2.0-pre 0874a8d3)