Protected Branches not working for imported repos
Created by: rodgerramjet
Summary:
Imported repository doesn't enforce protected branches. See #3544 (closed) - similar problem. Whats different from 3544 is that I have the symbolic link for the update hook defined.
If I create a fresh repo and test the same process with the same user, it (correctly) blocks pushes to the master branch which tells me that its not a problem with the users setup.
Steps to reproduce:
- Import (following steps from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/import.md)
- I imported a repo using gitlab-rake gitlab:import:repos
- add user as developer to project
- Ensure user isn't an Admin on project, etc
- Push using git cli with appropriate thumbprint for the developer
Expected behavior:
[remote rejected] master -> master (pre-receive hook declined)
Received behavior
d13fbf7..28f8efc master -> master Branch master set up to track remote branch master from origin.
Observations
Checked the symbolic link on both repositories - they are pointing at the same script
Output of checks
gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...
GitLab Shell version >= 2.6.3 ? ... OK (2.6.3)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
hooks directories in repos are links: ...
2/4 ... ok
1/5 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/var/opt/gitlab/git-data/repositories: OK
/var/opt/gitlab/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.20
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
2/4 ... yes
1/5 ... yes
Projects have satellites? ...
2/4 ... yes
1/5 ... yes
Redis version >= 2.0.0? ... yes
Ruby version >= 2.0.0 ? ... yes (2.1.6)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 1.7.10 ? ... yes (2.4.3)
Active users: 3
Checking GitLab ... Finished