Error about protected branches when trying to push to new projects
Summary
On a fresh install of GDK I'm seeing this error when I try to push to a new project, e.g.:
$ git push
remote: GitLab: You can only use an existing protected branch ref as the basis of a new protected branch.
To ssh://192.168.0.114:2222/gitlab-qa-sandbox-group/qa-test-2019-03-06-10-20-47-62f9cf2e8cd924dd/project-with-code-148073f5a4050897.git
! [remote rejected] master -> master (pre-receive hook declined)
It also happens even if I try to add a readme via the UI. The error appears as a notification when I click Commit.
Steps to reproduce
- Create a new project.
- Try to add a file (e.g., click the "Add README" button)
What is the current bug behavior?
What is the expected correct behavior?
The file is added (the push succeeds)
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Current User: mark Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.6 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 5.0.2 Git Version: 2.21.0 Sidekiq Version:5.2.5 Go Version: go1.12 linux/amd64
GitLab information Version: 11.9.0-pre Revision: 26ea6e18137 Directory: /home/mark/dev/gdk-ce2/gitlab DB Adapter: postgresql URL: http://192.168.0.114:3000 HTTP Clone URL: http://192.168.0.114:3000/some-group/some-project.git SSH Clone URL: ssh://mark@192.168.0.114:2222/some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 8.7.1 Repository storage paths:
- default: /home/mark/dev/gdk-ce2/repositories GitLab Shell path: /home/mark/dev/gdk-ce2/gitlab-shell Git: /usr/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Possibly related? https://gitlab.com/gitlab-org/gitlab-ce/commit/e371520f465a9f92794d5820faf5c21a893dd77e