GitLab: You are not allowed to force push
There is a race condition by which a git client is denied a force push to a branch that GitLab claims to be protected although it is not. The race is likely because the project was just created and is not yet finalized. Retrying the git push during 30 seconds does not help.
Steps to reproduce:
- serials=1 tests/setup-gitlab.sh
- while : ; do tox -e py3 -- -s fedeproxy/domain/test_fedeproxy.py::test_fedeproxy_inbox[GitLab-git] || break ; done
E sh.ErrorReturnCode_1:
E
E RAN: /usr/bin/git -C /tmp/pytest-of-loic/pytest-609/test_fedeproxy_inbox_GitLab_gi0/fedeproxy/otheruser/fedeproxy push --force origin Bca2c0433487968ada3ab8b3082af8de1691ca3872d766dde006ce879bb4e5e5c
E
E STDOUT:
E
E
E STDERR:
E remote: GitLab: You are not allowed to force push code to a protected branch on this project.
E To http://0.0.0.0:8181/otheruser/fedeproxy.git
E ! [remote rejected] Bca2c0433487968ada3ab8b3082af8de1691ca3872d766dde006ce879bb4e5e5c -> Bca2c0433487968ada3ab8b3082af8de1691ca3872d766dde006ce879bb4e5e5c (pre-receive hook declined)
E error: impossible de pousser des références vers 'http://oauth2:709a19812fce1095d9234fdab04d02bab731b07942052f4fdce5339ab09ff0eb@0.0.0.0:8181/otheruser/fedeproxy.git'