I am currently running GitLab Omnibus v7.1.0 (call it gitlab-a) on CentOS 6.5. I built a new GitLab server using CentOS 6.8 (gitlab-b, this will eventually be upgraded to the latest GitLab 8 version), installed GitLab Omnibus v7.1.0 via RPM package (gitlab-7.1.0_omnibus-1.el6.x86_64.rpm), ran a backup on the original server (gitlab-a) using the following command:
sudo gitlab-rake gitlab:backup:create
I secure copied the resulting backup tar file to the the "new" server (gitlab-b, in this case) and restored it:
bundle exec rake gitlab:backup:restore RAILS_ENV=production
I ran:
sudo gitlab-rake gitlab:check SANITIZE=true
It complained about permissions and missing satellites. I followed the direction given:
chmod -R ug+rwX,o-rwx /var/opt/gitlab/git-data/repositories
chmod -R ug-s /var/opt/gitlab/git-data/repositories
find /var/opt/gitlab/git-data/repositories -type d -print0 | sudo xargs -0 chmod g+s
sudo -u git -H bundle exec rake gitlab:satellites:create RAILS_ENV=production
I tested this new installation (gitlab-b) and am able to git clone
and git pull
without any issues. However, when I create a branch (call it test-123), make changes in the test-123 branch, then try to git push the test-123 branch (git push origin test-123
), I receive the following error:
Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 331 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: GitLab: You are not allowed to access test-123!
remote: error: hook declined to update refs/heads/test-123
To [email protected]:project/repo.git
! [remote rejected] test-123 -> test-123 (hook declined)
error: failed to push some refs to '[email protected]:project/repo.git'
I also noticed that on the new gitlab-b server, the /var/opt/gitlab/git-data/repositories/project/repo.git/refs/heads
directory is empty. I think this is part of the cause of the problem. I am not sure how to resolve.
I have googled most of the past two days and found numerous related issues and solutions; unfortunately, I have not been able to find a solution that resolves this issue. Any ideas or anything to get me in the right direction will be greatly appreciated! Thank you in advance for your time. Please let me know if any additional information is needed.
git branch
)? – Andreas Wolf